rust-lang

    rust-lang/libc

    Raw bindings to platform APIs for Rust

    backend
    Rust
    Apache-2.0
    2.6K stars
    1.3K forks
    2.6K GitHub watchers
    Updated Nov 4, 2026
    View on GitHub

    Build with Backblaze B2

    SDKs, agent skills, IDE extensions, and reference pipelines from Backblaze Labs. All open source.

    Explore Backblaze Labs

    Loading star history...

    Where it stands

    Rank, growth pace and release cadence relative to everything GStars tracks.

    2 releases in the last 90 days, the latest 19 days ago, with 422 contributors on GitHub.

    Use Cases & Benefits

    • Provides raw FFI bindings to platform system libraries for Rust, enabling direct interaction with C APIs.
    • Ensures platform-specific type definitions, constants, and function headers match the target environment for seamless interoperability.
    • Use for integrating low-level C libraries into Rust projects requiring precise system API access.
    • Use for developing cross-platform Rust applications that need consistent bindings to native OS features.
    • Use for creating no_std Rust crates that require system-level functionality without the standard library dependency.

    Should you depend on it?

    License terms, project hygiene and risks, from GitHub metadata and GStars' snapshots.

    License

    Apache 2.0

    Permissive: commercial use, modification and redistribution are allowed with attribution; includes an explicit patent grant from contributors.

    Community files

    • README: present
    • Contributing guide: present

    Watch-outs

    No watch-outs from GStars' checks.

    General guidance from repository metadata, not legal advice. How we score

    From the README

    libc provides all of the definitions necessary to easily interoperate with C code (or "C-like" code) on each of the platforms that Rust supports. This includes type definitions (e.g. c_int), constants (e.g. EINVAL) as well as function headers (e.g. malloc).

    This crate exports all underlying platform types, functions, and constants under the crate root, so all items are accessible as libc::foo. The types and values of all the exported APIs match the platform that libc is compiled for.

    Windows API bindings are not included in this crate. If you are looking for WinAPI bindings, consider using crates like windows-sys.

    More detailed information about the design of this library can be found in its associated RFC.

    Currently, libc has two active branches: main for the upcoming v1.0 release, and libc-0.2 for the currently published version. By default all pull requests should target main; once reviewed, they can be cherry picked to the libc-0.2 branch if needed.

    We will stop making new v0.2 releases once v1.0 is released.

    See the section in CONTRIBUTING.md for more details.

    Excerpt from the rust-lang/libc README on GitHub (Apache-2.0 license). © its authors.Read the full README on GitHub

    Daily snapshots

    Stars gained per day, and how forks and open issues moved, from GStars' daily snapshots

    Forks

    1.3K+39

    Open issues

    195+8

    Compared with peers in Backend

    Fastest-growing repositories GStars tracks in this cohort for the week of Nov 1, by 7-day star growth

    rust-lang/libc compared with Backend repositories by stars, 7-day star growth, health score and last release
    RepositoryStars+7dHealthLast release
    anthropics/skills187.8K+2.9K15—
    DuarteSantos8/openGym19.7K+2.4K602 days ago
    shiyu-coder/Kronos47.0K+2.3K16—
    NationalSecurityAgency/ghidra98.2K+2.3K6414 days ago
    microsoft/VibeVoice56.0K+1.1K29—
    rust-lang/libc2.6K—5919 days ago
    Category median56.0K+2.3K29—

    Also by rust-lang

    Other repositories from this maintainer that GStars tracks

    Discover Repositories

    Search across tracked repositories by name or description