Releases: calebzulawski/multiversion
Releases · calebzulawski/multiversion
Multiversion 0.7.4
Fixed
- Fix
is_{arch}_feature_detected
path for non-x86.
Multiversion 0.7.3
Fixed
- Don't include unstable target features in
targets = "simd"
.
Multiversion 0.7.1
Fixed
- Fixed handling patterns in
match_target
.
Multiversion 0.7.0
Changed
- The
multiversion
macro has been overhauled. Now uses a single attribute macro, rather than helper attributes. - Increased minimum required Rust version to 1.61.0.
Added
- 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::target
module for querying the selected target features. - Targets can now be specified by CPU (e.g.
x86-64-v2
orskylake
). - Added option to pass attributes to clones.
- Added special
targets = "simd"
option to automatically target all SIMD instruction sets.
Removed
- Removed the
specialize
mode. All targets now specify clones. Specialization should be implemented by querying the selected targets. - Removed support for functions that reference
self
orSelf
. Previous support was inconsistent and difficult to use correctly.
Fixed
- Fixed broken
impl Trait
support. Usingimpl Trait
in 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
Multiversion 0.6.1
Fixed
- Fixed disallowing some valid architectures, such as "wasm32"
Multiversion 0.6.0
Added
- Added
are_cpu_features_detected
macro. - Added
#[crate_path]
helper attribute for renaming/reimporting the crate.
Changed
- Changed
runtime_dispatch
Cargo feature tostd
- Changed static dispatching from the
#[static_dispatch]
helper attribute todispatch!
helper macro.
Multiversion 0.5.1
Changed
- Removed dependency on
regex
andonce_cell
Fixed
- Fixed bug where
#[multiversion]
failed to compile when crate was re-exported or renamed.
Multiversion 0.5.0
Added
- Support for associated functions (including methods).
- Support for
impl Trait
. - Specification for name mangling.
- Documentation for
#[safe_inner]
helper attribute for#[target]
.
Removed
- Removed
#[target_clones]
attribute (functionality is now included in#[multiversion]
attribute).
Changed
#[multiversion]
interface now uses helper attributes, providing both target specialization and function cloning.- Increased minimum required Rust version to 1.34.0.
Fixed
- Vague error spans now point to a more informative source location.
- All errors now produce
compile_error!
instead of macro panics.
Multiversion 0.4.0
Added
- Cargo feature
runtime_dispatch
(enabled by default) which adds runtime CPU feature detection. #[no_std]
support when theruntime_dispatch
feature is disabled.
Fixed
- Fixed disallowing features with dots, such as
sse4.2
.
Multiversion 0.3.0
Added
- Conditional compilation with
#[target_cfg]
helper macro - Support for const generics
Changed
multiversion
macro now requiresunsafe
to dispatch unsafe functions from safe functions
Fixed
- 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