-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile crate with stable rust #20
Comments
Additionally we're maintaining local copies of unstable methods behind the following features: I've subscribed to all 6 of these issues, so I should know if one moves to stable, in which case we can remove the local copy and use stdlib. |
**Description** Work towards issue #20 For each unstable standard library function we depend on, copy the implementation and documentation into the local crate and replace all usages of it. Added links to tracking issues so we can eventually swap back. **Motivation** This change is needed so that this crate can compile using the stable rust distribution. The downside to this change is that we will no longer receive fixes or other patches that the stdlib does on their version. If they uncover an issue, we won't know about it. Going to mitigate this by subscribing to each tracking issue. **Testing Done** - `cargo test` - `cargo miri test` - `cargo clippy`
**Description** - Remove `strict_provenance` and replace with usage of `sptr` crate, which is by the same person who authored the strict provenance change. - Add miri testing section with flags that should enable testing of strict provenance. - Also fix `perfcnt` and `criterion-perf-events` accidentally being added to regular dependencies. Moved those back to dev-dependencies. **Motivation** Partial progress towards #20. Ideally we'd just use the strict_provenance APIs in the standard lib, but those are still unstable (probably will be for some time). **Testing Done** - `cargo build --all-targets` - `cargo test` - `cargo miri test` - `cargo clippy`
**Description** Replace use of `NonNull::<[T]>::get_unchecked_mut` function call with a copy from the standard library. This function is used to index into a pointer to a slice (`*const [T]`) and return a pointer to an element (`*const T`) without doing bounds checking. **Motivation** This change is a partial solution towards issue #20. The only remaining unstable feature used is `hasher_prefixfree_extras`. **Testing Done** - `cargo test` - `cargo miri test` - `cargo fmt` - `cargo clippy`
**Description** Remove last nightly feature, `hasher_prefixfree_extras` and replace with copy from the standard library implementation. **Motivation** This change should allow us to compile the crate on stable, part of the work tracked in issue #20. **Testing Done** - `cargo test` - `cargo clippy` - `cargo fmt`
**Description** - Remove `strict_provenance` and replace with usage of `sptr` crate, which is by the same person who authored the strict provenance change. - Add miri testing section with flags that should enable testing of strict provenance. - Also fix `perfcnt` and `criterion-perf-events` accidentally being added to regular dependencies. Moved those back to dev-dependencies. **Motivation** Partial progress towards #20. Ideally we'd just use the strict_provenance APIs in the standard lib, but those are still unstable (probably will be for some time). **Testing Done** - `cargo build --all-targets` - `cargo test` - `cargo miri test` - `cargo clippy`
**Description** Replace use of `NonNull::<[T]>::get_unchecked_mut` function call with a copy from the standard library. This function is used to index into a pointer to a slice (`*const [T]`) and return a pointer to an element (`*const T`) without doing bounds checking. **Motivation** This change is a partial solution towards issue #20. The only remaining unstable feature used is `hasher_prefixfree_extras`. **Testing Done** - `cargo test` - `cargo miri test` - `cargo fmt` - `cargo clippy`
**Description** Remove last nightly feature, `hasher_prefixfree_extras` and replace with copy from the standard library implementation. **Motivation** This change should allow us to compile the crate on stable, part of the work tracked in issue #20. **Testing Done** - `cargo test` - `cargo clippy` - `cargo fmt`
**Description** - Update CI to run multiple versions of rust: stable, beta, nightly, and 1.62 (as MSRV) - Update documentation to use `+nightly` when required, assuming a stable-preferred development environment. - In CI when running under the `nightly` version of rust, enable the `nightly` cargo feature when building and running tests - Add a new job that runs miri tests **Motivation** This change is taking advantage of the completion of issue #20, now that we don't strictly require any nightly unstable features. This allows us to test on multiple versions of rust. **Testing Done** None
The crate now compiles with the stable version of rust, and there is also a See https://github.com/declanvk/blart/actions/runs/3512050106/jobs/5883375643 for an example of compile and testing with stable rust. |
Currently we have to use the nightly distribution of rust because we need some unstable features.
Nightly features we use:
After removing all unstable features (or they get promoted to stable) we should expand the github actions matrix to run all the build and tests for multiple version of rust: nightly, beta, stable, and a pegged MSRV.
The text was updated successfully, but these errors were encountered: