[package]
edition = "2024"
rust-version = "1.101"
name = "prism-inference"
version = "0.1.21"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
default-run = "prism-inference"
description = "Bounded Rust CPU inference and tokenization for Prism-compatible GGUF models"
readme = "README.md"
keywords = [
"inference",
"gguf",
"prism",
"ternary",
"qwen35",
]
categories = [
"science",
"command-line-utilities",
]
license = "Apache-2.0"
repository = "https://github.com/symbiogenesis/prism-inference"
[features]
cli = [
"dep:serde",
"dep:serde_json",
]
default = [
"cli",
"experimental-neon",
]
experimental-neon = [
"dep:fearless_simd",
"dep:bonsai-neon-dot",
]
parallel-rows = ["dep:rayon"]
[lib]
name = "bonsai_prism_runtime"
path = "src/lib.rs"
[[bin]]
name = "bonsai-swift-worker"
path = "src/bin/swift_worker.rs"
test = false
required-features = ["cli"]
[[bin]]
name = "bonsai-token-worker"
path = "src/bin/token_worker.rs"
test = false
required-features = ["cli"]
[[bin]]
name = "prism-inference"
path = "src/main.rs"
required-features = ["cli"]
[[example]]
name = "swift_model_check"
path = "examples/swift_model_check.rs"
test = true
required-features = ["cli"]
[[example]]
name = "upstream_prism"
path = "tests/upstream_prism/harness.rs"
test = true
required-features = ["cli"]
[[test]]
name = "backend"
path = "tests/backend.rs"
[[test]]
name = "backend_allocation"
path = "tests/backend_allocation.rs"
[[test]]
name = "backend_backward_graph"
path = "tests/backend_backward_graph.rs"
[[test]]
name = "backend_backward_image"
path = "tests/backend_backward_image.rs"
[[test]]
name = "backend_iquants"
path = "tests/backend_iquants.rs"
[[test]]
name = "backend_ops"
path = "tests/backend_ops.rs"
[[test]]
name = "backend_packed_add"
path = "tests/backend_packed_add.rs"
[[test]]
name = "backend_signquants"
path = "tests/backend_signquants.rs"
[[test]]
name = "backend_spatial"
path = "tests/backend_spatial.rs"
[[test]]
name = "backend_threadpool"
path = "tests/backend_threadpool.rs"
[[test]]
name = "batch_allocator"
path = "tests/batch_allocator.rs"
[[test]]
name = "bpe"
path = "tests/bpe.rs"
[[test]]
name = "cli_capabilities"
path = "tests/cli_capabilities.rs"
[[test]]
name = "cli_tokenize"
path = "tests/cli_tokenize.rs"
[[test]]
name = "codec"
path = "tests/codec.rs"
[[test]]
name = "fp4"
path = "tests/fp4.rs"
[[test]]
name = "gguf_context"
path = "tests/gguf_context.rs"
[[test]]
name = "grammar_runtime"
path = "tests/grammar_runtime.rs"
[[test]]
name = "graph"
path = "tests/graph.rs"
[[test]]
name = "iq1"
path = "tests/iq1.rs"
[[test]]
name = "iq2"
path = "tests/iq2.rs"
[[test]]
name = "iq3"
path = "tests/iq3.rs"
[[test]]
name = "iq_encoders"
path = "tests/iq_encoders.rs"
[[test]]
name = "iquants"
path = "tests/iquants.rs"
[[test]]
name = "jinja_capabilities"
path = "tests/jinja_capabilities.rs"
required-features = ["cli"]
[[test]]
name = "kernels"
path = "tests/kernels.rs"
[[test]]
name = "kquants"
path = "tests/kquants.rs"
[[test]]
name = "model"
path = "tests/model.rs"
[[test]]
name = "model_owned"
path = "tests/model_owned.rs"
[[test]]
name = "optimization"
path = "tests/optimization.rs"
[[test]]
name = "packed_codec"
path = "tests/packed_codec.rs"
[[test]]
name = "parallel_rows"
path = "tests/parallel_rows.rs"
[[test]]
name = "pretokenizer"
path = "tests/pretokenizer.rs"
[[test]]
name = "prompt_input"
path = "tests/prompt_input.rs"
[[test]]
name = "quantization_policy"
path = "tests/quantization_policy.rs"
[[test]]
name = "reasoning_budget"
path = "tests/reasoning_budget.rs"
[[test]]
name = "row_quantizers"
path = "tests/row_quantizers.rs"
[[test]]
name = "runtime"
path = "tests/runtime.rs"
[[test]]
name = "sampling"
path = "tests/sampling.rs"
[[test]]
name = "signquants"
path = "tests/signquants.rs"
[[test]]
name = "simd"
path = "tests/simd.rs"
[[test]]
name = "special_input"
path = "tests/special_input.rs"
[[test]]
name = "special_tokens"
path = "tests/special_tokens.rs"
[[test]]
name = "swift_chat"
path = "tests/swift_chat.rs"
[[test]]
name = "swift_client"
path = "tests/swift_client.rs"
[[test]]
name = "swift_sampling"
path = "tests/swift_sampling.rs"
[[test]]
name = "swift_session"
path = "tests/swift_session.rs"
[[test]]
name = "swift_worker_output"
path = "tests/swift_worker_output.rs"
[[test]]
name = "swift_worker_request"
path = "tests/swift_worker_request.rs"
[[test]]
name = "text_output"
path = "tests/text_output.rs"
[[test]]
name = "text_session"
path = "tests/text_session.rs"
[[test]]
name = "token_client"
path = "tests/token_client.rs"
[[test]]
name = "token_input"
path = "tests/token_input.rs"
[[test]]
name = "token_worker"
path = "tests/token_worker.rs"
[[test]]
name = "tokenization"
path = "tests/tokenization.rs"
[[test]]
name = "tokenizer"
path = "tests/tokenizer.rs"
[[test]]
name = "tquants"
path = "tests/tquants.rs"
[[test]]
name = "upstream_sampling"
path = "tests/upstream_sampling.rs"
[[test]]
name = "vocabulary"
path = "tests/vocabulary.rs"
[[test]]
name = "vocabulary_contract"
path = "tests/vocabulary_contract.rs"
[dependencies.aho-corasick]
version = "=1.1.5"
[dependencies.bonsai-gguf]
version = "=0.1.3"
default-features = false
[dependencies.bonsai-prism]
version = "=0.1.3"
[dependencies.bonsai-ternary]
version = "=0.1.1"
[dependencies.fancy-regex]
version = "=0.14.0"
[dependencies.rayon]
version = "=1.12.0"
optional = true
[dependencies.regex]
version = "=1.13.1"
[dependencies.serde]
version = "=1.0.229"
features = ["derive"]
optional = true
[dependencies.serde_json]
version = "=1.0.154"
optional = true
[dependencies.sha2]
version = "=0.11.1"
default-features = false
[dependencies.unicode-normalization-alignments]
version = "=0.1.12"
[dev-dependencies.sentencepiece-rs]
version = "=0.2.2"
default-features = false
[dev-dependencies.serde]
version = "=1.0.229"
features = ["derive"]
[dev-dependencies.serde_json]
version = "=1.0.154"
[dev-dependencies.tokenizers]
version = "=0.22.2"
features = ["fancy-regex"]
default-features = false
[target.'cfg(all(target_arch = "aarch64", target_os = "windows", target_env = "msvc"))'.dependencies.bonsai-neon-dot]
version = "=0.1.0"
optional = true
[target.'cfg(all(target_arch = "aarch64", target_os = "windows", target_env = "msvc"))'.dependencies.fearless_simd]
version = "=1.1.0"
optional = true
[lints.clippy]
allow_attributes_without_reason = "deny"
as_conversions = "deny"
dbg_macro = "deny"
exit = "deny"
expect_used = "deny"
mem_forget = "deny"
multiple_unsafe_ops_per_block = "deny"
panic = "deny"
print_stderr = "deny"
print_stdout = "deny"
todo = "deny"
undocumented_unsafe_blocks = "deny"
unimplemented = "deny"
unwrap_used = "deny"
[lints.clippy.all]
level = "deny"
priority = -1
[lints.clippy.cargo]
level = "deny"
priority = -1
[lints.clippy.nursery]
level = "deny"
priority = -1
[lints.clippy.pedantic]
level = "deny"
priority = -1
[lints.rust]
elided_lifetimes_in_paths = "deny"
explicit_outlives_requirements = "deny"
ffi_unwind_calls = "deny"
invalid_reference_casting = "forbid"
meta_variable_misuse = "deny"
missing_docs = "deny"
non_ascii_idents = "forbid"
redundant_imports = "deny"
redundant_lifetimes = "deny"
static_mut_refs = "forbid"
trivial_casts = "deny"
trivial_numeric_casts = "deny"
unreachable_pub = "deny"
unsafe_code = "deny"
unsafe_op_in_unsafe_fn = "forbid"
unused_import_braces = "deny"
unused_lifetimes = "deny"
unused_must_use = "deny"
unused_qualifications = "deny"
warnings = "deny"
[lints.rust.future_incompatible]
level = "deny"
priority = -1
[lints.rust.rust_2018_idioms]
level = "deny"
priority = -1
[lints.rust.rust_2024_compatibility]
level = "deny"
priority = -1
[lints.rustdoc.all]
level = "deny"
priority = -1
[profile.release]
debug-assertions = false
overflow-checks = true
[profile.test]
debug-assertions = true
overflow-checks = true