# rust-lang/libc

Raw bindings to platform APIs for Rust

Repository: https://github.com/rust-lang/libc
Canonical: https://ross.abutalabs.com/products/libc
Homepage: https://docs.rs/libc
Language: Rust
License: Apache-2.0
License Family: permissive
Last push: 2026-08-25T05:40:26+00:00

## Health v2 (maintenance only)
Score: 97/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 94, longevity 100
- inputs: {"age_days": 4250, "days_push": 8, "days_rel": 43, "gap_med": 11, "n_releases_24m": 38}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2598, forks 1299 (observed 2026-08-28T04:07:03.248473+00:00)

## What it is
A Rust crate providing raw FFI bindings to platform system libraries (libc), exporting type definitions, constants, and function declarations for C interop. It is a foundational, widely-downloaded dependency of the Rust ecosystem.

## Use cases
- call C library functions from Rust
- get libc type definitions and constants in Rust
- write cross-platform system-level Rust code
- interoperate with C code on Linux or macOS
- build no_std system utilities in Rust

## When to choose
- you need raw access to POSIX/libc APIs from Rust
- you are writing low-level systems code or a runtime
- you need portable C-interop types across many platforms

## When to avoid
- you need Windows API bindings (use windows-sys instead)
- you want safe, idiomatic wrappers rather than raw FFI
- you only need standard library functionality

## Facets
- artifact type: library
- maturity: stable
- function: sdk, developer-tools
- domain: operating-systems, developer-tools, cross-platform
- platform: rust, windows, cross-platform, embedded
- tags: ffi, bindings, libc, system-programming, no-std, linux, macos

## Member repositories
- rust-lang/libc (main) score 97

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:03.248473+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:21:21.055893+00:00, confidence not recorded.
  - readme: https://github.com/rust-lang/libc (fetched 2026-08-28T04:07:03.248473+00:00, sha 40038ad58f26)
  - homepage: https://docs.rs/libc (fetched 2026-08-29T10:04:26.855726+00:00, sha 3d7d8a362554)
  - site_page: https://docs.rs/ (fetched 2026-08-29T10:04:26.860175+00:00, sha 0aa25b04e401)
  - site_page: https://docs.rs/crate/libc/latest (fetched 2026-08-29T10:04:26.861952+00:00, sha 182faf3687dd)
  - site_page: https://docs.rs/crate/libc/latest/features (fetched 2026-08-29T10:04:26.863851+00:00, sha c3599471d10d)
  - site_page: https://docs.rs/about (fetched 2026-08-29T10:04:26.865554+00:00, sha 29ab7986fbf5)
  - site_page: https://docs.rs/about/badges (fetched 2026-08-29T10:04:26.867190+00:00, sha 6588cac258af)
  - site_page: https://docs.rs/about/builds (fetched 2026-08-29T10:04:26.868679+00:00, sha 811231ca4680)
  - site_page: https://docs.rs/about/metadata (fetched 2026-08-29T10:04:26.870058+00:00, sha 0dcdccb2b2b2)
  - site_page: https://docs.rs/about/redirections (fetched 2026-08-29T10:04:26.871422+00:00, sha 1b1efd93105f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
