All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.8.0 - 2024-12-07
- Upgraded to syn 2. This shouldn't break compatibility with the 0.7 releases, but there might be minor differences.
- Read retpoline target features from command line flags because they're LLVM features, not Rust features.
0.7.4 - 2024-03-15
- Fix
is_{arch}_feature_detectedpath for non-x86.
0.7.3 - 2023-08-10
- Don't include unstable target features in
targets = "simd".
0.7.2 - 2023-05-10
- Added workaround for documentation bug (rust-lang/rust#111415)
0.7.1 - 2022-12-23
- Fixed handling patterns in
match_target.
0.7.0 - 2022-12-09
- The
multiversionmacro has been overhauled. Now uses a single attribute macro, rather than helper attributes. - Increased minimum required Rust version to 1.61.0.
- The function dispatch method is now selectable, between direct or indirect dispatch, as well as compile-time static dispatch.
- Added a variety of macros in the
multiversion::targetmodule for querying the selected target features. - Targets can now be specified by CPU (e.g.
x86-64-v2orskylake). - Added option to pass attributes to clones.
- Added special
targets = "simd"option to automatically target all SIMD instruction sets.
- Removed the
specializemode. All targets now specify clones. Specialization should be implemented by querying the selected targets. - Removed support for functions that reference
selforSelf. Previous support was inconsistent and difficult to use correctly.
- Fixed broken
impl Traitsupport. Usingimpl Traitin return position now results in an error. - Dispatch is now bypassed in scenarios where no targets are specified for the target architecture, or if the first matching target features are known to exist at compile time.
- Improved performance of direct dispatch.
- Avoid indirect dispatch in some situations, such as when using retpolines
0.6.1 - 2020-08-18
- Fixed disallowing some valid architectures, such as "wasm32"
0.6.0 - 2020-07-13
- Added
are_cpu_features_detectedmacro. - Added
#[crate_path]helper attribute for renaming/reimporting the crate.
- Changed
runtime_dispatchCargo feature tostd - Changed static dispatching from the
#[static_dispatch]helper attribute todispatch!helper macro.
0.5.1 - 2020-05-29
- Removed dependency on
regexandonce_cell
- Fixed bug where
#[multiversion]failed to compile when crate was re-exported or renamed.
0.5.0 - 2020-04-19
- Support for associated functions (including methods).
- Support for
impl Trait. - Specification for name mangling.
- Documentation for
#[safe_inner]helper attribute for#[target].
- Removed
#[target_clones]attribute (functionality is now included in#[multiversion]attribute).
#[multiversion]interface now uses helper attributes, providing both target specialization and function cloning.- Increased minimum required Rust version to 1.34.0.
- Vague error spans now point to a more informative source location.
- All errors now produce
compile_error!instead of macro panics.
0.4.0 - 2020-03-20
- Cargo feature
runtime_dispatch(enabled by default) which adds runtime CPU feature detection. #[no_std]support when theruntime_dispatchfeature is disabled.
- Fixed disallowing features with dots, such as
sse4.2.
0.3.0 - 2019-12-30
- Conditional compilation with
#[target_cfg]helper macro - Support for const generics
multiversionmacro now requiresunsafeto dispatch unsafe functions from safe functions
- Fixed incorrect argument forwarding for destructured function arguments
- Static dispatch across modules now uses proper visibility
- Specifying architectures without features no longer results in compilation errors
0.2.0 - 2019-11-10
- Improved ergonomics of
multiversionmacro. It has been changed from a function-like macro to a macro attribute.
targetmacro attribute- Static dispatching with
#[static_dispatch]helper macro - Support for
async, lifetimes, and generic functions - This changelog
0.1.1 - 2019-09-10
- Removed an extra dependency
0.1.0 - 2019-09-10
- Initial multiversion implementation