diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d090955..191a249 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -33,9 +33,6 @@ jobs: - name: Run tests run: cargo test --verbose --all-features - - name: Documentation - run: cargo doc --all-features - msrv: name: Verify MSRV (1.85) runs-on: ubuntu-latest @@ -48,3 +45,59 @@ jobs: - name: Check run: cargo check --all-features + + ensure_no_std: + name: Ensure no_std + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install Rust Toolchain (nightly) + uses: dtolnay/rust-toolchain@nightly + with: + targets: thumbv6m-none-eabi + + - name: Build (no_std) + run: cargo build --no-default-features --target thumbv6m-none-eabi + shell: bash + + coverage: + name: Coverage + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install Rust Toolchain (stable) + uses: dtolnay/rust-toolchain@stable + with: + components: llvm-tools-preview + + - name: Install cargo-llvm-cov + run: cargo install cargo-llvm-cov + + - name: Run coverage + run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + files: lcov.info + fail_ci_if_error: false + + audit: + name: Security Audit + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Install Rust Toolchain + uses: dtolnay/rust-toolchain@stable + + - name: Install cargo-audit + run: cargo install cargo-audit + + - name: Run cargo audit + run: cargo audit diff --git a/CHANGELOG.md b/CHANGELOG.md index fdd7f88..ed2ca2f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project are documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.1.2] - 2026-08-17 + +### Fixed + +- Restored `no_std` build on `thumbv6m-none-eabi` (and other `no_std` targets) by declaring the `half` dependency with `default-features = false` and forwarding the `std`/`alloc` features of `multi-cbor` to `half`. Previously `half = "2.7"` enabled `half`'s default `std` feature unconditionally, so `cargo build --no-default-features --target thumbv6m-none-eabi` linked `std` into a target that does not provide it, failing the `Ensure no_std` CI job with `E0463: can't find crate for std`. + ## [0.1.1] - 2026-08-17 ### Added @@ -52,4 +58,6 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm [0.1.0]: https://github.com/cryptidtech/multi-cbor/releases/tag/v0.1.0 -[0.1.1]: https://github.com/cryptidtech/multi-cbor/releases/tag/v0.1.1 \ No newline at end of file +[0.1.1]: https://github.com/cryptidtech/multi-cbor/releases/tag/v0.1.1 + +[0.1.2]: https://github.com/cryptidtech/multi-cbor/releases/tag/v0.1.2 \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 2147146..ae969e8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "multi-cbor" -version = "0.1.1" +version = "0.1.2" authors = [ "Pyfisch ", "Steven Fackler ", @@ -17,21 +17,21 @@ categories = ["encoding"] [features] default = ["std"] -std = ["serde/std"] -alloc = ["serde/alloc"] +std = ["serde/std", "half/std"] +alloc = ["serde/alloc", "half/alloc"] unsealed_read_write = [] # The `tags` feature uses `thread_local!` and `std::cell::RefCell` for the # tag-state plumbing that DAG-CBOR needs. It requires the `std` feature. tags = ["std"] [dependencies] -half = "2.4" +half = { version = "2.7", default-features = false } serde = { version = "1.0", default-features = false, features = ["alloc"] } [dev-dependencies] criterion = "0.8" hex = "0.4" -proptest = "1.4" +proptest = "1.11" serde = { version = "1.0", features = ["derive"] } serde_derive = "1.0" serde_json = "1.0" @@ -104,4 +104,4 @@ cargo = { level = "warn", priority = -1 } multiple_crate_versions = { level = "allow", priority = 1 } [lints.rust] -unsafe_code = "deny" \ No newline at end of file +unsafe_code = "deny"