Releases: Techcable/rustversion-detect
Release list
Accept July 31st as a valid date
Backport date fixes from v0.3.1
I plan to yank old versions without this fix.
Fixed
- Relax day-of-month validation, so date
2026-07-31is accepted (fixes [issue #10]).
Backported from release v0.3.1.
Remove deprecated maybe_const_fn! macro
Removed
- BREAKING: Remove deprecated
maybe_const_fn!macro.- Remove
compat-maybe-const-fnfeature, which is now unnecessary. - Eliminates our only dependency.
- Remove
NOTE: Although promised in an early draft, using semver-trick would be counterproductive.
Pull changes from rustversion v1.0.23.
rustversion logic update
Updated version detection logic to mirror rustversion v1.0.23 (previously v1.0.17).
This includes the following changes:
- Support for the
miraicompiler wrapper. - Set
RUSTVERSION=1duringrustc --versioncommand (fixes rustversion#67)
Note that only changes to sources in the build/ subdirectory of rustversion
are actually applicable to rustversion-detect.
Even then, some changes are not needed here (ex. no need to workaround -Zfmt-debug=none).
Added
- Add
#[must_use]annotations to most public methods.
Split maybe_const_fn! into its own crate.
Changes
- The
maybe_const_fn!macro has been moved to its own crate.
For compatibility reasons, this macro is re-exported from therustversion-detectcrate (but still deprecated)- It is possible to disable this re-exporting and remove the dependency by turning off the default feature
compat-maybe-const-fn.
- It is possible to disable this re-exporting and remove the dependency by turning off the default feature
- Improved crate-level documentation and README.
Removed
- Hide documentation for deprecated
maybe_const_fn!macro.
Move version detection to runtime
Avoids the need to wait for compilation of a build script.
Caches the result of running rustc so that multiple build scripts will use the same result.
Support Rust 1.31
- Deprecate
date!macro, because it can't be implemented on Rust 1.31 - Run tests on MSRV (previously only ran
cargo check) - Use
cargo rdmeto sync README.md with crate docs. - Use github actions to run lychee link-checker on README.md
This reduces the MSRV from 1.32 to 1.31.
Deprecate `spec!` macro in favor of helper methods
Use the RustVersion.is_since_major_version and RustVersion.is_since_patch_version methods instead of is_since(spec!(...)).
This avoids a macro import, is simpler, faster, and allows const evaulation.
The macro will be removed in a future version.
Fix compilation on MSRV
- Bump MSRV from 1.31 to 1.32 because of needed macro features
- Add basic compile-time benchmarks (only one laptop)
- Fix broken documentation link to
StableVersionSpec::minor - Fix reference to rustversion crate in README.md
Initial release as rustversion-detect
Code based off rustversion, but with all procedural macro code removed.