c-scape

Crates.ioc-scape
lib.rsc-scape
version
sourcesrc
created_at2021-10-08 17:07:34.453447
updated_at2024-10-20 16:08:57.167176
descriptionA libc bottom-half implementation in Rust
homepage
repositoryhttps://github.com/sunfishcode/c-ward
max_upload_size
id462406
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Dan Gohman (sunfishcode)

documentation

https://docs.rs/c-scape

README

c-scape

A layer underneath c-gull

Github Actions CI Status zulip chat crates.io page docs.rs docs

c-scape is a layer underneath c-gull. It provides a subset of libc features, containing only features that don't require Rust's std to implement. This allows it to be used by std itself.

This is currently highly experimental, incomplete, and some things aren't optimized. And it depends on Nightly Rust.

c-scape's two modes

Similar to c-gull, c-scape has "take-charge" and "coexist-with-libc" modes. One of these must be enabled.

In "take-charge" mode, c-scape takes charge of the process, handling program startup (via Origin) providing malloc (via c-scape), and other things. This requires some additional setup; see the c-scape-example example crate for more details.

In "coexist-with-libc" mode, c-scape can be used as a drop-in (partial) libc replacement. To use it, just change your typical libc dependency in Cargo.toml to this:

libc = { version = "<c-scape version>", package = "c-scape", features = ["coexist-with-libc"] }
Commit count: 345

cargo fmt