diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2e6a6c3ae..378dd22aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,14 +42,36 @@ jobs: matrix: target: - wasm32-wasi - + - thumbv7em-none-eabihf steps: - uses: actions/checkout@v4 + with: + path: crate_root + # We use a synthetic crate to ensure no dev-dependencies are enabled, which can + # be incompatible with some of these targets. + - name: Create synthetic crate for testing + run: cargo init --lib ci-build + - name: Copy Rust version into synthetic crate + run: cp crate_root/rust-toolchain.toml ci-build/ + - name: Copy patch directives into synthetic crate + run: | + echo "[patch.crates-io]" >> ./ci-build/Cargo.toml + cat ./crate_root/Cargo.toml | sed "0,/.\+\(patch.crates.\+\)/d" >> ./ci-build/Cargo.toml + - name: Add no_std pragma to lib.rs + run: | + echo "#![no_std]" > ./ci-build/src/lib.rs + - name: Add sapling-crypto as a dependency of the synthetic crate + working-directory: ./ci-build + run: cargo add --no-default-features --path ../crate_root + - name: Add lazy_static with the spin_no_std feature + working-directory: ./ci-build + run: cargo add lazy_static --features "spin_no_std" - name: Add target + working-directory: ./ci-build run: rustup target add ${{ matrix.target }} - - run: cargo fetch - - name: Build for ${{ matrix.target }} target - run: cargo build --verbose --no-default-features --target ${{ matrix.target }} + - name: Build for target + working-directory: ./ci-build + run: cargo build --verbose --target ${{ matrix.target }} bitrot: name: Bitrot check diff --git a/CHANGELOG.md b/CHANGELOG.md index 36e4da4b1..fc440977b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ and this project adheres to Rust's notion of - `orchard::pczt::Zip32Derivation::extract_account_index` ### Changed +- MSRV is now 1.66 - Migrated to `nonempty 0.11`. ## [0.10.1] - 2024-12-16 diff --git a/Cargo.toml b/Cargo.toml index 3194a57e7..24b3388e5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ authors = [ "Kris Nuttycombe ", ] edition = "2021" -rust-version = "1.65" +rust-version = "1.66" description = "The Orchard shielded transaction protocol" license = "MIT OR Apache-2.0" repository = "https://github.com/zcash/orchard" diff --git a/README.md b/README.md index c2138a11f..2bf2f424e 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,19 @@ # orchard [![Crates.io](https://img.shields.io/crates/v/orchard.svg)](https://crates.io/crates/orchard) # -Requires Rust 1.65+. +Requires Rust 1.66+. ## Documentation - [The Orchard Book](https://zcash.github.io/orchard/) - [Crate documentation](https://docs.rs/orchard) +## `no_std` compatibility + +Downstream users of this crate must enable the `spin_no_std` feature of the +`lazy_static` crate in order to take advantage of `no_std` builds; this is due +to the fact that `--no-default-features` builds of `lazy_static` still rely on +`std`. + ## License Copyright 2020-2023 The Electric Coin Company. diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 5ecda6e49..fb11b593c 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.65.0" +channel = "1.66.0" components = [ "clippy", "rustfmt" ]