Skip to content

Releases: calebzulawski/multiversion

Multiversion 0.7.4

15 Mar 04:49
Compare
Choose a tag to compare

Fixed

  • Fix is_{arch}_feature_detected path for non-x86.

Multiversion 0.7.3

10 Aug 13:27
Compare
Choose a tag to compare

Fixed

  • Don't include unstable target features in targets = "simd".

Multiversion 0.7.1

23 Dec 19:33
Compare
Choose a tag to compare

Fixed

  • Fixed handling patterns in match_target.

Multiversion 0.7.0

10 Dec 01:15
Compare
Choose a tag to compare

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

Multiversion 0.6.1

18 Aug 17:30
Compare
Choose a tag to compare

Fixed

  • Fixed disallowing some valid architectures, such as "wasm32"

Multiversion 0.6.0

14 Jul 03:22
Compare
Choose a tag to compare

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.

Multiversion 0.5.1

29 May 06:04
1d1b29d
Compare
Choose a tag to compare

Changed

  • Removed dependency on regex and once_cell

Fixed

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

Multiversion 0.5.0

19 Apr 23:03
Compare
Choose a tag to compare

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

21 Mar 02:50
Compare
Choose a tag to compare

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.

Multiversion 0.3.0

31 Dec 02:04
Compare
Choose a tag to compare

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