diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6a9f3fd..dc9b459 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,3 +40,19 @@ jobs: - name: cargo test run: cargo test + + test-no-std: + runs-on: ubuntu-latest + name: cargo build no_std + steps: + - uses: actions/checkout@v4 + + - name: install stable toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + target: thumbv6m-none-eabi + components: clippy + + - name: cargo build + run: cargo build --target=thumbv6m-none-eabi diff --git a/Cargo.toml b/Cargo.toml index 687dd0b..1d415d6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Bruce Mitchener "] license = "MIT OR Apache-2.0" readme = "README.md" description = "Convert common things to humanized output. Parse input text in a human-friendly way." -keywords = ["humanize", "human", "parse", "format"] +keywords = ["humanize", "human", "parse", "format", "no_std"] documentation = "https://endoli.github.io/humanize.rs" homepage = "https://github.com/endoli/humanize.rs" repository = "https://github.com/endoli/humanize.rs" diff --git a/src/lib.rs b/src/lib.rs index bb68b6f..a9efbc8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -39,6 +39,10 @@ //! assert_eq!(enabled, true); //! ``` //! +//! # Support for `no_std` +//! +//! By default, this crate works without the Rust standard library. +//! //! # Ideas for the Future //! //! * Actually implement formatting. @@ -47,6 +51,7 @@ //! [moment.js]: http://momentjs.com/ //! ['at' command]: http://www.computerhope.com/unix/uat.htm +#![no_std] #![warn(missing_docs)] #![deny( trivial_numeric_casts,