4 releases

new 0.1.3 Jan 29, 2025
0.1.2 Dec 23, 2024
0.1.1 Dec 4, 2024
0.1.0 Dec 4, 2024

#58 in No standard library

Download history 220/week @ 2024-11-29 72/week @ 2024-12-06 9/week @ 2024-12-13 114/week @ 2024-12-20 31/week @ 2024-12-27 25/week @ 2025-01-03 35/week @ 2025-01-10 16/week @ 2025-01-17 66/week @ 2025-01-24

151 downloads per month

MIT/Apache

130KB
1.5K SLoC

nostd

GitHub Workflow Status Crates.io Version GitHub License

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.

Features

  • std::prelude emulation
use nostd::prelude::*;
// Now you can access `Box`, `String`, `Vec`, etc.
  • std::io emulation by core2 (feature: io)
  • std::collections::hash_(map|set) emulation by hashbrown (feature: hashbrown)

Usage

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"]

Contributing

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.

License

Licensed under either of:

at your option.

Dependencies

~250KB