Skip to content

Commit

Permalink
Flag as no_std.
Browse files Browse the repository at this point in the history
Let's see how long we cam stay as `no_std` to enable possibly
broader usage.
  • Loading branch information
waywardmonkeys committed Jan 5, 2024
1 parent 6e45533 commit 31c04ba
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Bruce Mitchener <[email protected]>"]
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"
Expand Down
5 changes: 5 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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,
Expand Down

0 comments on commit 31c04ba

Please sign in to comment.