#libc #standard #linux #thin #interface #replace #perspective

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

#3 in #perspective

Download history 14/week @ 2024-02-26 2/week @ 2024-03-11 28/week @ 2024-04-01 58/week @ 2024-04-15

86 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

~395KB
~10K SLoC