hakmem 0.2.0

Hilbert and Morton curves with range covers, rank/select, Myers edit distance, PEXT/PDEP and byte lanes, built from bit tricks with property-tested laws. no_std, no dependencies.
Documentation
[package]
name = "hakmem"
version = "0.2.0"
edition = "2024"
# MSRV: edition 2024 needs 1.85, cast_signed/cast_unsigned 1.87, the GFNI
# intrinsics 1.89. Checked in CI
# against the `cargo package` tarball (nix/msrv.nix).
rust-version = "1.89"
description = "Hilbert and Morton curves with range covers, rank/select, Myers edit distance, PEXT/PDEP and byte lanes, built from bit tricks with property-tested laws. no_std, no dependencies."
license = "MIT OR Apache-2.0"
authors = ["Michal <acannix@proton.me>"]
repository = "https://github.com/mightsleep/hakmem"
keywords = ["hilbert-curve", "morton", "rank-select", "levenshtein", "bit-manipulation"]
categories = ["algorithms", "data-structures", "no-std"]
exclude = ["/.github", "/nix", "/flake.*", "/codegen", "/public-api", "/release", "/.coderabbit.yaml", "/.gitignore"]

[features]
default = ["alloc"]
# Disable every hardware fast path (BMI2 PEXT/PDEP, PCLMULQDQ) even when
# the target feature is enabled. For microarchitectures where the
# instruction exists but is microcoded (PDEP/PEXT on AMD Zen 1 and Zen 2:
# ~18 cycles, hundreds of uops) the broadword definitions are faster.
portable = []
# Owning conveniences over the caller-owned structures: `rank9::Rank9Buf`.
# On by default, as std users expect; `default-features = false` is the
# crate with no allocation at all, which is how it builds for embedded.
alloc = []

[dependencies]

[dev-dependencies]
proptest = "1"
criterion = { version = "0.8", default-features = false, features = ["cargo_bench_support"] }
# Incumbents for benches/incumbents.rs: the crates people use today.
broadword = "0.2"      # Tov: select1/rank in a u64
strsim = "0.11"        # Levenshtein on &str
triple_accel = "0.4"   # SIMD-accelerated Myers Levenshtein on bytes
# Incumbents for benches/rank9.rs: rank/select directories people use today.
sux = { version = "0.14", default-features = false }   # Vigna: rank9 / select9
sucds = "0.9"            # Rank9Sel
vers-vecs = "1"          # RsVec
# Incumbents for benches/hilbert.rs: 2D Hilbert curves.
fast_hilbert = "2.1"     # 512-byte transition table, three levels a step
lindel = "0.1"           # Skilling's transpose, one bit a step
# Incumbents for the Morton rows of benches/hilbert.rs: the most downloaded.
morton = "0.3"           # u16 pairs, both spread at once in a u64
morton-encoding = "2"    # any count and width, halving shifts (lindel's Morton)
zorder = "0.2"           # PDEP behind a token, shifts otherwise
[[bench]]
name = "select"
harness = false

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

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

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

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

[lints.rust]
unsafe_op_in_unsafe_fn = "warn"
missing_docs = "warn"
unreachable_pub = "warn"

[lints.clippy]
pedantic = { level = "warn", priority = -1 }
nursery = { level = "warn", priority = -1 }
missing_errors_doc = "allow"
module_name_repetitions = "allow"
# A generic or a provided method that is not `#[inline]` can stay a call in
# a user's crate however small it is (docs/design.md 11.11): every
# public function says which it wants.
missing_inline_in_public_items = "warn"

[package.metadata.docs.rs]
all-features = true