safevalue 0.1.1

A value based approach to uphold SAFETY requirements for unsafe Rust code.
Documentation

safevalue

Build & Test Status Crates.io Documentation

Usage

Add safevalue to your project e.g. via cargo add safevalue.

Then:



fn main() {
    //TODO!
}

Rationale

Features

[X] Zero Cost Abstraction. [X] Ergonomic [ ] Good Idea. Well, it works quite nicely in my kernel project, let's see how it goes.

Dependencies

safevalue's only runtime dependency is paste. This dependency will be removed when/if concat-idents is powerful enough and stabilised.

It does additionally have dev-dependencies used for testing.

Rust

safevalue works on stable rust and requires rust version 1.85 (2024 Edition).

No STD

This crate is #[no_std] as well as no alloc, because it does not need them. If this is ever to change, alloc or std will be hidden behind appropriate feature flags.

License

Licensed under either of:

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Note: If you are running the tests, sometimes the error

multiple candidates for rlib dependency safevalue found [E0464]' pops up. It seems some duplicate build artifact between cargo check and cargo build confuse the tests. Run cargo clean and it should work again.