sorex 1.0.9

Formally verified full-text search with suffix arrays
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2021"
name = "sorex"
version = "1.0.9"
authors = ["Harry Tummalacherla <harry@harryzorus.xyz>"]
build = "build.rs"
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Formally verified full-text search with suffix arrays"
homepage = "https://github.com/harryzorus/sorex"
documentation = "https://github.com/harryzorus/sorex/tree/main/docs"
readme = "README.md"
keywords = [
    "search",
    "fuzzy",
    "suffix-array",
    "wasm",
    "formal-verification",
]
categories = [
    "algorithms",
    "text-processing",
    "wasm",
]
license = "Apache-2.0"
repository = "https://github.com/harryzorus/sorex"

[package.metadata.wasm-pack.profile.release]
wasm-opt = false

[package.metadata.deb]
maintainer = "Harry Tummalachērla <harry@harryzorus.xyz>"
copyright = "2026, Harry Tummalachērla"
license-file = [
    "LICENSE",
    "0",
]
extended-description = """
Sorex is a formally verified full-text search engine using suffix arrays.
It provides fast substring and fuzzy search with mathematical guarantees
of correctness via Lean 4 proofs.

WASM is embedded in every .sorex index file by default.

Commands:
  sorex index --input <dir> --output <dir>   Build search index
  sorex inspect <file.sorex>                 Inspect index structure

"""
section = "utils"
priority = "optional"
assets = [
    [
    "target/release-native/sorex",
    "usr/bin/sorex",
    "755",
],
    [
    "examples/generate-eu-data.sh",
    "usr/share/sorex/examples/generate-eu-data.sh",
    "755",
],
]
maintainer-scripts = "debian/"

[features]
bench-datasets = []
default = [
    "parallel",
    "unicode-normalization",
    "serde_json",
    "embed-wasm",
    "deno-runtime",
]
deno-runtime = [
    "deno_core",
    "tokio",
]
embed-wasm = []
lean = ["sorex-lean-macros"]
parallel = [
    "rayon",
    "indicatif",
    "parking_lot",
]
wasm = [
    "wasm-bindgen",
    "serde-wasm-bindgen",
    "js-sys",
    "rayon",
    "wasm-bindgen-rayon",
    "parking_lot",
]
wasm-simd = ["wasm"]
wasm-single-threaded = [
    "wasm-bindgen",
    "serde-wasm-bindgen",
    "js-sys",
]
wasm-threads = ["wasm"]

[lib]
name = "sorex"
crate-type = ["rlib"]
path = "src/lib.rs"

[[bin]]
name = "sorex"
path = "src/main.rs"

[[test]]
name = "build"
path = "tests/build.rs"

[[test]]
name = "integration"
path = "tests/integration.rs"

[[test]]
name = "property"
path = "tests/property.rs"

[[test]]
name = "regression"
path = "tests/regression.rs"

[[test]]
name = "search"
path = "tests/search.rs"

[[test]]
name = "unit"
path = "tests/unit.rs"

[[bench]]
name = "bench_searcher"
path = "benches/bench_searcher.rs"
harness = false
required-features = ["bench-datasets"]

[[bench]]
name = "bench_wasm"
path = "benches/bench_wasm.rs"
harness = false
required-features = ["deno-runtime"]

[[bench]]
name = "decode_sections"
path = "benches/decode_sections.rs"
harness = false
required-features = ["bench-datasets"]

[[bench]]
name = "search_bench"
path = "benches/search_bench.rs"
harness = false

[dependencies.atty]
version = "0.2"

[dependencies.brotli]
version = "6.0"

[dependencies.clap]
version = "4"
features = ["derive"]

[dependencies.crc32fast]
version = "1.4"

[dependencies.deno_core]
version = "0.377"
optional = true

[dependencies.indicatif]
version = "0.17"
optional = true

[dependencies.js-sys]
version = "0.3"
optional = true

[dependencies.parking_lot]
version = "0.12"
optional = true

[dependencies.rayon]
version = "1.10"
optional = true

[dependencies.serde]
version = "1.0"
features = ["derive"]

[dependencies.serde-wasm-bindgen]
version = "0.6"
optional = true

[dependencies.serde_json]
version = "1.0"
optional = true

[dependencies.sorex-lean-macros]
version = "1.0.0"
optional = true

[dependencies.tokio]
version = "1"
features = ["rt"]
optional = true

[dependencies.unicode-normalization]
version = "0.1"
optional = true

[dependencies.wasm-bindgen]
version = "0.2"
optional = true

[dependencies.wasm-bindgen-rayon]
version = "1.2"
optional = true

[dev-dependencies.brotli]
version = "6.0"

[dev-dependencies.criterion]
version = "0.5"

[dev-dependencies.fuzzy-matcher]
version = "0.3"

[dev-dependencies.proptest]
version = "1.0"

[dev-dependencies.simsearch]
version = "0.2"

[dev-dependencies.strsim]
version = "0.11"

[dev-dependencies.tantivy]
version = "0.22"

[dev-dependencies.tempfile]
version = "3"

[lints.clippy]
cast_possible_truncation = "allow"
cast_precision_loss = "allow"
cast_sign_loss = "allow"
doc_markdown = "allow"
items_after_statements = "allow"
manual_midpoint = "allow"
missing_const_for_fn = "allow"
missing_errors_doc = "allow"
missing_panics_doc = "allow"
module_name_repetitions = "allow"
must_use_candidate = "allow"
needless_range_loop = "allow"
similar_names = "allow"
uninlined_format_args = "allow"

[lints.clippy.all]
level = "warn"
priority = -1

[lints.rust]
unsafe_code = "forbid"

[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = ["cfg(kani)"]

[profile.release]
opt-level = 3
lto = "thin"
codegen-units = 1
panic = "abort"
strip = false

[profile.release-native]
opt-level = 3
panic = "unwind"
inherits = "release"
strip = true