nostd provides essential std-like types in no_std environments.
This crate re-exports types from the alloc and core crates under the
familiar std path while also offering alternative implementations for
types not available in those crates.
nostd aims to help port code written for std to no_std with minimal
changes, often requiring only a replacement of std:: with nostd::.
Warning
A successful build does not guarantee that the code will work as expected. Exercise caution and thoroughly test your application before using it in production.
std::preludeemulation
use nostd::prelude::*;
// Now you can access `Box`, `String`, `Vec`, etc.std::ioemulation bycore2(feature:io)std::collections::hash_(map|set)emulation byhashbrown(feature:hashbrown)
Add this to your Cargo.toml:
[dependencies]
nostd = "0.1"By default, nostd is intended to be used in no_std environment. To use
it in std environment, enable the std feature:
[features]
default = ["std"]
std = ["nostd/std"]Contributions are welcome! If you find a bug, have a feature request, or wish to expand functionality, feel free to open an issue or submit a pull request.
Licensed under either of:
- Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.