archmage 0.9.21

Safely invoke your intrinsic power, using the tokens granted to you by the CPU. Cast primitive magics faster than any mage alive.
Documentation
[workspace]
members = [".", "archmage-macros", "magetypes", "xtask", "tests/no-features-crate"]

[workspace.package]
version = "0.9.21"
edition = "2024"
rust-version = "1.89"
license = "MIT OR Apache-2.0"
repository = "https://github.com/imazen/archmage"

[package]
name = "archmage"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
description = "Safely invoke your intrinsic power, using the tokens granted to you by the CPU. Cast primitive magics faster than any mage alive."
documentation = "https://docs.rs/archmage"
keywords = ["simd", "avx", "neon", "wasm", "safe"]
categories = ["development-tools", "hardware-support", "no-std"]
include = [
    "src/**",
    "benches/**",
    "tests/**",
    "examples/**",
    "token-registry.toml",
    "Cargo.toml",
    "Cargo.lock",
    "README.md",
    "CHANGELOG.md",
    "LICENSE*",
]

[features]
default = ["std"]
std = []
# Backwards-compat: macros are now always included. This feature exists so
# `features = ["macros"]` doesn't break.
macros = []
# AVX-512 token support (Avx512Token, X64V4xToken, X64V4Token, etc.)
# Also enables AVX-512 safe memory ops from safe_unaligned_simd.
avx512 = ["safe_unaligned_simd/avx512", "archmage-macros/avx512"]
# Backwards-compat: safe_unaligned_simd is now always included (no longer optional).
# This feature exists so `features = ["safe_unaligned_simd"]` doesn't break.
safe_unaligned_simd = []
# Make token disabling work even when compiled with -Ctarget-cpu=native.
# Without this, the compiler bakes summon() into a no-op and tokens can't be
# disabled at runtime. With this, compiled_with() returns None and summon()
# uses runtime detection + cache, so dangerously_disable_token_process_wide()
# and for_each_token_permutation() always work.
testable_dispatch = []
# Expose forge_token_dangerously() as a public method on token types.
# Without this, it's pub(crate) only. Needed for testing token infrastructure
# from external crates. The method is unsafe and deprecated — prefer summon().
forge-token-api = []

[dependencies]
# Proc-macro crate for #[arcane], #[rite], #[autoversion], incant!, etc.
archmage-macros = { version = "0.9.21", path = "archmage-macros" }
# Safe unaligned SIMD load/store (reference-based, no raw pointers)
safe_unaligned_simd = { version = "0.2.5" }

# Dev dependencies that don't support WASM
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
zenbench = { version = "0.1.2", features = ["criterion-compat"] }
trybuild = "1.0"
macrotest = "1.2.1"
safe_unaligned_simd = { version = "0.2.5", features = ["avx512"] }

[[bench]]
name = "tokens"
harness = false

[[bench]]
name = "asm_inspection"
harness = false

[[bench]]
name = "summon_overhead"
harness = false

[package.metadata.docs.rs]
features = ["std", "avx512"]
rustdoc-args = ["--cfg", "docsrs"]
# Build docs for multiple targets to show all platform-specific tokens
targets = ["x86_64-unknown-linux-gnu", "aarch64-unknown-linux-gnu", "wasm32-unknown-unknown"]