17 releases (2 stable)
Uses new Rust 2024
| 1.0.1 | Sep 11, 2025 |
|---|---|
| 1.0.0 | Jun 25, 2025 |
| 0.25.1 | Jun 4, 2025 |
| 0.24.0-alpha.3 | Mar 19, 2025 |
| 0.18.7 | Nov 28, 2022 |
#12 in #internet-computer
57,671 downloads per month
Used in 218 crates
(9 directly)
57KB
844 lines
Bindings to the Internet Computer system API.
The raw bindings can be found in the [sys] module. The functions in the crate root provide slightly higher-level
bindings in terms of slices instead of pointers/lengths, accurately typed pointers, etc., but otherwise does not adapt
the API. Where this is all that is needed for the functions to be safe, they are marked as safe, but function pointers
cannot be made safe and as such call_new is still unsafe.
Any function ic0.foo that would write to a user buffer has two versions, foo which takes &mut [u8] and
foo_uninit which takes &mut [MaybeUninit<u8>].
ic0
Internet Computer System API binding.
What
ic0 is simply a safe Rust translation of the System API as described in the IC interface specification. The unsafe direct imports can be found in the ic0::sys module.
Update
ic0 keeps in step with the IC interface specification. Particularly, ic0 is directly generated from the system API in that repo.
When interface-spec releases a new version that modify system API:
- replace
ic0.txtin the root of this project; - copy any new function headers to
manual_safety_comments.txt, and add a safety comment for the function; - execute
cargo run --example=ic0build;
src/sys.rs should be updated.