# libc

> Raw bindings to platform APIs for Rust

Source: https://talira.ai/catalog/libc-3saddh68
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / system bindings](https://talira.ai/categories/libraries/system-bindings), [languages / rust](https://talira.ai/categories/languages/rust)
- Licence: MIT OR Apache-2.0[^1]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Backed by: [The Rust Project](https://talira.ai/orgs/rust-project.md)

libc is the Rust project's crate of raw FFI bindings to each platform's system libraries: the type definitions (such as `c_int`), constants (such as `EINVAL`) and function declarations (such as `malloc`) needed to call C code on every platform [Rust](https://talira.ai/catalog/rust-mf51vs5t.md) supports, all exported at the crate root and matching the platform it's compiled for. It works without the standard library (`no_std`) and doesn't cover the Windows API (the windows-sys crate does). Version 0.2 is the published line while 1.0 is in alpha; it's dual-licensed MIT or Apache-2.0.

## Links

- GitHub: https://github.com/rust-lang/libc
- Docs: https://docs.rs/libc

## Problems it solves

- call a C system function like malloc or ioctl from Rust
- get the right C types and constants for the platform my Rust code compiles on
- low-level bindings to the operating system for a Rust crate without the standard library

## Features

- C type definitions, constants and function declarations for each platform
- covers every platform Rust supports, except the Windows API
- works in no_std crates
- MSRV Rust 1.65

## Trust

Overall: 0.67 out of 1.
Signals: maintenance 1.00, adoption 0.68, momentum 0.39, community 1.00, backing 0.30, extensibility 0.00.

- last commit 4 days ago
- 239 commits in the last 90 days
- latest release ctest-v0.5.2 4 days ago
- 2.6k GitHub stars
- 961 contributors
- backed by The Rust Project

## Alternatives

- [windows-rs](https://talira.ai/catalog/windows-rs-j2gbtbbw.md): Microsoft's Rust crates for calling Windows APIs, from COM and WinRT to system services and raw bindings
- [nix (Rust)](https://talira.ai/catalog/nix-rust-1rk1c0e2.md): Safe Rust bindings to Unix and Linux system APIs

## Sources

[^1]: https://github.com/rust-lang/libc/blob/main/Cargo.toml (checked 26 Nov 2026)
