Skip to content

Conversation

@tarcieri
Copy link
Contributor

@tarcieri tarcieri commented Jan 4, 2026

Depends on: #149

At the time this was originally added it provided an interesting way to use the subtle implementation of black_box, but now that core::hint::black_box is stable someone who wants equivalent functionality can implement it themselves using that.

This commit is intended as the base commit for other proposed breaking
changes, almost all of which will involve bumping the MSRV close to this
(in fact if we want `const fn` support for `black_box` we need to go all
the way to 1.86, this doesn't quite do that yet).

It includes a few different changes, and I'm happy to split these up
into separate PRs if that's helpful:

- Updates CI config
  - sets `permissions` to read-only
  - sets `RUSTFLAGS` to `-D warnings` to deny warnings
  - uses `dtolnay/rust-toolchain` instead of the unmaintained
    `actions-rs/toolchain@v1`
  - uses `run` directly instead of the unmaintained
    `actions-rs/cargo@v1`
  - removes feature-specific tests because features have been removed(!)
  - adds additional `unsafe` code testing using `cargo careful` and
    `cargo miri`
  - tests both `dev` and `release` builds
- Bumps version to `3.0.0-pre` to denote breaking changes
- Removes obsolete `html_root_url`
- Bumps edition to 2024; note this changed rustfmt rules and so rustfmt
  has also been applied with the new rules
- Bumps MSRV to 1.85.0 and adds `rust-version` setting to `Cargo.toml`
- Removes obsolete settings related to Travis CI (which has since been
  replaced by GitHub Actions)
- Adds `.github` to `exclude` in `Cargo.toml`
- Bumps `rand` from `0.8` to `0.9` (though `0.10` will be released soon)
- Removes all features: with the MSRV bump, we no longer need any of
  these feature gates as all features will be available (the `std`
  feature didn't actually use anything from `std` and is thus pointless)
- Makes `core::hint::black_box` the only value barrier/fence strategy
  for `Choice`: despite the scary documentation, it should be superior
  to the previous `core::ptr::read_volatile` approach, at least based
  on questions I have posed to various Rust compiler engineers, and
  is also `const fn` stable in Rust 1.86.
@tarcieri tarcieri force-pushed the v3.x-pre/remove-black-box-type branch 2 times, most recently from d28e201 to 98cfc76 Compare January 4, 2026 03:25
Depends on: dalek-cryptography#149

At the time this provided an interesting way to use the `subtle`
implementation of `black_box`, but now that `core::hint::black_box`
is stable someone who wants equivalent functionality can implement it
themselves using that.
@tarcieri tarcieri force-pushed the v3.x-pre/remove-black-box-type branch from 98cfc76 to 6cf86c7 Compare January 4, 2026 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant