diff --git a/.github/workflows/bench-primitives.yml b/.github/workflows/bench-primitives.yml index b0edaf1..395bdea 100644 --- a/.github/workflows/bench-primitives.yml +++ b/.github/workflows/bench-primitives.yml @@ -67,7 +67,7 @@ jobs: - name: 🏃🏻‍♀️ Benchmarks (using Nix as shell) working-directory: ciphers - run: nix develop --command cargo bench -F bench --bench primitives --verbose $RUST_TARGET_FLAG -- --output-format bencher | tee ../bench-primitives.txt + run: nix develop ".#devShells.${{ matrix.system }}.default" --command cargo bench -F bench --bench primitives --verbose $RUST_TARGET_FLAG -- --output-format bencher | tee ../bench-primitives.txt - name: Extract benchmarks uses: cryspen/benchmark-data-extract-transform@v2 diff --git a/.github/workflows/bench-protocol.yml b/.github/workflows/bench-protocol.yml index 6a66f74..752ed90 100644 --- a/.github/workflows/bench-protocol.yml +++ b/.github/workflows/bench-protocol.yml @@ -66,7 +66,7 @@ jobs: # Benchmarks ... - name: 🏃🏻‍♀️ Benchmarks - run: nix develop --command cargo bench -p rosenpass --bench trace_handshake -F trace_bench --verbose $RUST_TARGET_FLAG >bench-protocol.json + run: nix develop ".#devShells.${{ matrix.system }}.default" --command cargo bench -p rosenpass --bench trace_handshake -F trace_bench --verbose $RUST_TARGET_FLAG >bench-protocol.json - name: Upload benchmarks uses: cryspen/benchmark-upload-and-plot-action@v3 diff --git a/ciphers/Cargo.toml b/ciphers/Cargo.toml index 080deeb..5a1c375 100644 --- a/ciphers/Cargo.toml +++ b/ciphers/Cargo.toml @@ -25,12 +25,12 @@ experiment_libcrux_chachapoly_test = [ ] experiment_libcrux_kyber = ["dep:libcrux-ml-kem", "dep:rand"] bench = [ - "dep:thiserror", - "dep:rand", - "dep:libcrux", - "dep:libcrux-blake2", - "dep:libcrux-ml-kem", - "dep:libcrux-chacha20poly1305", + "dep:thiserror", + "dep:rand", + "dep:libcrux", + "dep:libcrux-blake2", + "dep:libcrux-ml-kem", + "dep:libcrux-chacha20poly1305", ] [[bench]] diff --git a/util/src/lib.rs b/util/src/lib.rs index 43acbac..7949a3b 100644 --- a/util/src/lib.rs +++ b/util/src/lib.rs @@ -30,12 +30,12 @@ pub mod option; pub mod result; /// Time and duration utilities. pub mod time; +/// Trace benchmarking utilities +#[cfg(feature = "trace_bench")] +pub mod trace_bench; /// Type-level numbers and arithmetic. pub mod typenum; /// Zero-copy serialization utilities. pub mod zerocopy; /// Memory wiping utilities. pub mod zeroize; -/// Trace benchmarking utilities -#[cfg(feature = "trace_bench")] -pub mod trace_bench;