Will Rust drop dependency on libc and make direct system calls? when ? (Please don't mention no_std case)

This page summarizes the projects mentioned and recommended in the original post on /r/rust

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • rustix

    Safe Rust bindings to POSIX-ish APIs

  • rustix can make syscalls directly to Linux. There's a rustc fork that can use it to build std.

  • windows-rs

    Rust for Windows

  • Windows: Syscalls are undocumented and unstable, and it is in fact impossible to compile any native code for Windows without linking against proprietary lib files ("import library" in Windows lingo). That said, there is a new feature #[link(kind="raw-dylib")] that allows windows-rs crate to link against dlls directly instead of using compile time import libraries: https://github.com/microsoft/windows-rs/pull/977. This is as "native" as you can get on Windows.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • chrono

    Date and time library for Rust (by chronotope)

  • libc isn't "just a wrapper". Is a massive legacy codebase filled with hacks, UBs and bugs: https://github.com/chronotope/chrono/issues/499

  • mpv

    🎥 Command line video player

  • fls

    fastest ls in the west

  • And then there are some interfaces in libc that just look absolutely nothing like the system APIs. In libc, if you want to list the contents of a directory you call opendir then repeatedly call readdir to get a pointer to the next entry in the directory. But behind readdir is an array of directory entry types. So if you're implementing something like ls on top of libc, in most cases you end up dominated by small inefficiencies like that. I wrote this basically to see how big that effect is, the answer is somewhere around 2x: https://github.com/saethlin/fls

  • go

    The Go programming language

  • This was one of them https://github.com/golang/go/issues/6719

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts