The posixutils-rs 0.2.1 project has been released. It is aimed at developing a collection of command line utilities in Rust that are mentioned in the POSIX standard and meet its requirements (cp, mv, awk, make, vi, find, sort, wc, xargs, sh, m4, sed, etc.). Whenever possible, existing crate packages are used in the development. The posixutils-rs code is distributed under the MIT license.
The project is primarily focused on achieving compliance with the POSIX.2024 specification and does not plan to provide compatibility with GNU utilities, whose functionality is perceived by the authors as unreasonably bloated. However, posixutils-rs plans to implement the most popular extended options of GNU utilities found in existing scripts.
Among the differences from the uutils project, which develops the GNU Coreutils implementation in Rust, is a wider scope of utilities, including, among other things, the creation of such POSIX-specified system components as vi, awk, bc, m4, cron and the c99 compiler, as well as a minimalistic approach, which implies providing only the minimum necessary set of options defined in the POSIX specification or without which it is problematic to do. The programs in the posixutils-rs set are initially supplied as self-contained code that can be used in other projects.
Currently, 55 utilities developed by the project comply with POSIX and are at the test coverage stage, 22 utilities have the required functionality (but test coverage has not yet been implemented), 20 are at the draft version stage, and work on 44 utilities has not yet begun. Among the utilities with implemented functionality: awk, basename, bc, cp, cut, chown, date, diff, file, find, grep, ls, nice, ps, sort, strings, tail, tr, tty, wc, uniq. Among the utilities, work on which has not yet begun: crontab, c17, cflow, ctags, gettext, ed, ex, iconv, lex, locale, mailx, make, patch, pax, sed, sh, sccs, yacc, uucp, vi.
Changes in the new release include the addition of implementations of the awk, m4, ps, realpath, join, time, fuser, and gencat utilities, as well as initial support for working in environments based on the musl C library and the provision of the ftw library for directory tree traversal with race-safety.
Additionally, we can note the announcement of the rav1d project, which develops a high-performance decoder for the AV1 video encoding format, written in the Rust language. The development is carried out by porting the decoder code of the dav1d library, which is distinguished by its high performance, to Rust. The prepared port is fully compatible with the dav1d library API. The choice in favor of porting an existing library instead of writing our own version is explained by the desire to use an already proven and tested decoder as a basis in order to avoid possible compatibility issues and take into account all the intricacies of working with the AV1 format.
In its current form, the prepared implementation of rav1d is 6% slower than dav1d in terms of performance, but in the future, after code optimization, it is planned to achieve parity in performance. To achieve high performance, an approach was used in which the basic functions for decoding primitive values are implemented in assembler in the form of unsafe blocks (assembler code from dav1d is used), the data in which is received after checking by stream parsing functions written in Rust (past experience of identifying vulnerabilities in video decoders shows that problems mainly arise in high-level format parsing code, and not in low-level data operations).
Source: opennet.ru
