PackageTrack
Sign in Get early access

multiversion

Easy function multiversioning

0.8.0 14M downloads/mo #2587 most downloaded on crates.io calebzulawski/multiversion

What this package is like to depend on

Last release 2 years ago

no release in 18 months

Ships unpredictably

gaps range from 2 weeks to 2.3 years

Nearly every release is documented

notes for 15 of 15 stable releases

Nothing withdrawn

no release was ever pulled

7 years old

15 releases · first in 2019

0 releases in the last 12 months

see the full history below

Release timeline

15 releases · Sep 2019 to Dec 2024
2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 15
  1. 0.8.0 08 Dec 2024
    Release notes

    Changed

    • Upgraded to syn 2. This shouldn't break compatibility with the 0.7 releases, but there might be minor differences.

    Fixed

    • Read retpoline target features from command line flags because they're LLVM features, not Rust features.
    Open source →
  2. 0.7.4 15 Mar 2024
    Release notes

    Fixed

    • Fix is_{arch}_feature_detected path for non-x86.
    Open source →
    Release notes

    Fixed

    • Fix is_{arch}_feature_detected path for non-x86.
    Open source →
  3. 0.7.3 10 Aug 2023
    Release notes

    Fixed

    • Don't include unstable target features in targets = "simd".
    Open source →
    Release notes

    Fixed

    • Don't include unstable target features in targets = "simd".
    Open source →
  4. 0.7.2 10 May 2023
    Release notes

    Fixed

    • Added workaround for documentation bug (https://github.com/rust-lang/rust/issues/111415)
    Open source →
  5. 0.7.1 23 Dec 2022
    Release notes

    Fixed

    • Fixed handling patterns in match_target.
    Open source →
    Release notes

    Fixed

    • Fixed handling patterns in match_target.
    Open source →
  6. 0.7.0 10 Dec 2022
    Release notes

    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 or skylake).
    • 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 or Self. Previous support was inconsistent and difficult to use correctly.

    Fixed

    • Fixed broken impl Trait support. Using impl 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
    Open source →
    Release notes

    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 or skylake).
    • 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 or Self. Previous support was inconsistent and difficult to use correctly.

    Fixed

    • Fixed broken impl Trait support. Using impl 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
    Open source →
  7. 0.6.1 18 Aug 2020
    Release notes

    Fixed

    • Fixed disallowing some valid architectures, such as "wasm32"
    Open source →
    Release notes

    Fixed

    • Fixed disallowing some valid architectures, such as "wasm32"
    Open source →
  8. 0.6.0 14 Jul 2020
    Release notes

    Added

    • Added are_cpu_features_detected macro.
    • Added #[crate_path] helper attribute for renaming/reimporting the crate.

    Changed

    • Changed runtime_dispatch Cargo feature to std
    • Changed static dispatching from the #[static_dispatch] helper attribute to dispatch! helper macro.
    Open source →
    Release notes

    Added

    • Added are_cpu_features_detected macro.
    • Added #[crate_path] helper attribute for renaming/reimporting the crate.

    Changed

    • Changed runtime_dispatch Cargo feature to std
    • Changed static dispatching from the #[static_dispatch] helper attribute to dispatch! helper macro.
    Open source →
  9. 0.5.1 29 May 2020
    Release notes

    Changed

    • Removed dependency on regex and once_cell

    Fixed

    • Fixed bug where #[multiversion] failed to compile when crate was re-exported or renamed.
    Open source →
    Release notes

    Changed

    • Removed dependency on regex and once_cell

    Fixed

    • Fixed bug where #[multiversion] failed to compile when crate was re-exported or renamed.
    Open source →
  10. 0.5.0 19 Apr 2020
    Release notes

    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.
    Open source →
    Release notes

    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.
    Open source →
  11. 0.4.0 21 Mar 2020
    Release notes

    Added

    • Cargo feature runtime_dispatch (enabled by default) which adds runtime CPU feature detection.
    • #[no_std] support when the runtime_dispatch feature is disabled.

    Fixed

    • Fixed disallowing features with dots, such as sse4.2.
    Open source →
  12. 0.3.0 31 Dec 2019
    Release notes

    Added

    • Conditional compilation with #[target_cfg] helper macro
    • Support for const generics

    Changed

    • multiversion macro now requires unsafe 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
    Open source →
  13. 0.2.0 11 Nov 2019
    Release notes

    Changed

    • Improved ergonomics of multiversion macro. It has been changed from a function-like macro to a macro attribute.

    Added

    • target macro attribute
    • Static dispatching with #[static_dispatch] helper macro
    • Support for async, lifetimes, and generic functions
    • This changelog
    Open source →
  14. 0.1.1 10 Sep 2019
    Release notes

    Fixed

    • Removed an extra dependency
    Open source →
  15. 0.1.0 10 Sep 2019
    Release notes

    Added

    • Initial multiversion implementation
    Open source →

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive