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

nightly veneer

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

5 releases

new 0.2.2 Dec 13, 2024
0.2.1 Oct 2, 2023
0.2.0 Sep 15, 2023
0.1.1 Dec 17, 2021
0.1.0 Aug 2, 2021

#234 in Unix APIs

Download history 15/week @ 2024-09-22 4/week @ 2024-09-29 91/week @ 2024-12-08

91 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