interplane.Get Omega
Read in your language

aienux

Aienux, the AienOS kernel: boot, scheduling, IPC and capability boundaries. Pre-alpha; host, emulator and physical evidence are labelled separately.

Brought by drakestapleton

branch main Branches Tags History

aienux / vendor / libc / README.md

101 lines · 3719 bytes Raw Blame History Rendered
1# libc - Raw FFI bindings to platforms' system libraries
2
3[![GHA Status]][GitHub Actions] [![Latest Version]][crates.io] [![Documentation]][docs.rs] ![License]
4
5`libc` provides all of the definitions necessary to easily interoperate with C
6code (or "C-like" code) on each of the platforms that Rust supports. This
7includes type definitions (e.g. `c_int`), constants (e.g. `EINVAL`) as well as
8function headers (e.g. `malloc`).
9
10This crate exports all underlying platform types, functions, and constants under
11the crate root, so all items are accessible as `libc::foo`. The types and values
12of all the exported APIs match the platform that libc is compiled for.
13
14Windows API bindings are not included in this crate. If you are looking for
15WinAPI bindings, consider using crates like [windows-sys].
16
17More detailed information about the design of this library can be found in its
18[associated RFC][rfc].
19
20[rfc]: https://github.com/rust-lang/rfcs/blob/HEAD/text/1291-promote-libc.md
21[windows-sys]: https://docs.rs/windows-sys
22
23## v1.0 Roadmap
24
25Currently, `libc` has two active branches: `main` for the upcoming v1.0 release,
26and `libc-0.2` for the currently published version. By default all pull requests
27should target `main`; once reviewed, they can be cherry picked to the `libc-0.2`
28branch if needed.
29
30We will stop making new v0.2 releases once v1.0 is released.
31
32See the section in [CONTRIBUTING.md](CONTRIBUTING.md#v10-roadmap) for more
33details.
34
35## Usage
36
37Add the following to your `Cargo.toml`:
38
39```toml
40[dependencies]
41libc = "0.2"
42```
43
44## Rust version support
45
46The minimum supported Rust toolchain version is currently **Rust 1.65**.
47
48Increases to the MSRV are allowed to change without a major (i.e. semver-
49breaking) release in order to avoid a ripple effect in the ecosystem. A policy
50for when this may change is a work in progress.
51
52`libc` may continue to compile with Rust versions older than the current MSRV
53but this is not guaranteed.
54
55## Platform support
56
57You can see the platform(target)-specific docs on [docs.rs], select a platform
58you want to see.
59
60See [`ci/verify-build.py`](https://github.com/rust-lang/libc/blob/HEAD/ci/verify-build.py) for
61the platforms on which `libc` is guaranteed to build for each Rust toolchain.
62The test matrices at [GitHub Actions] show the platforms in which `libc` tests
63are run.
64
65<div class="platform_docs"></div>
66
67## License
68
69This project is licensed under either of
70
71* [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0)
72 ([LICENSE-APACHE](https://github.com/rust-lang/libc/blob/HEAD/LICENSE-APACHE))
73
74* [MIT License](https://opensource.org/licenses/MIT)
75 ([LICENSE-MIT](https://github.com/rust-lang/libc/blob/HEAD/LICENSE-MIT))
76
77at your option.
78
79## Contributing
80
81We welcome all people who want to contribute. Please see the
82[contributing instructions] for more information.
83
84[contributing instructions]: https://github.com/rust-lang/libc/blob/HEAD/CONTRIBUTING.md
85
86Contributions in any form (issues, pull requests, etc.) to this project must
87adhere to Rust's [Code of Conduct].
88
89[Code of Conduct]: https://www.rust-lang.org/policies/code-of-conduct
90
91Unless you explicitly state otherwise, any contribution intentionally submitted
92for inclusion in `libc` by you, as defined in the Apache-2.0 license, shall be
93dual licensed as above, without any additional terms or conditions.
94
95[GitHub Actions]: https://github.com/rust-lang/libc/actions
96[GHA Status]: https://github.com/rust-lang/libc/workflows/CI/badge.svg
97[crates.io]: https://crates.io/crates/libc
98[Latest Version]: https://img.shields.io/crates/v/libc.svg
99[Documentation]: https://docs.rs/libc/badge.svg
100[docs.rs]: https://docs.rs/libc
101[License]: https://img.shields.io/crates/l/libc.svg