#syscalls #libc #run-time #standard #interface #overhead #thin

nightly veneer

A very thin std-like library that doesn't depend on libc

4 releases

0.2.1 Oct 2, 2023
0.2.0 Sep 15, 2023
0.1.1 Dec 17, 2021
0.1.0 Aug 2, 2021

#465 in Unix APIs

Download history 4/week @ 2024-07-26 1/week @ 2024-08-02 8/week @ 2024-09-20 10/week @ 2024-09-27 1/week @ 2024-10-04

78 downloads per month
Used in fls

MIT/Apache

83KB
2K SLoC

Essentially, a replacement for the Rust standard library on Linux.

The Rust standard library makes tradeoffs in both API and implementation which are generally good but are inappropriate for some uses. This library offers an alternative perspective. In particular, it aims for:

  • No linkage against a libc
  • A minimum of unsafe code outside of that required to write syscall wrappers
  • The lowest runtime overhead possible, even where that makes interfaces awkward

These motivations primarily come from my experience trying to implement a POSIX ls that isn't significantly larger or slower than GNU's ls. For small programs, the accidental complexity of combining Rust's standard library with a libc implementation becomes the dominant contributor of both code size and execution speed.

Dependencies

~385KB
~10K SLoC