[package]
edition = "2024"
rust-version = "1.85"
name = "cera"
version = "0.2.7"
build = "build.rs"
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Rust-native LLM inference engine"
readme = "README.md"
keywords = [
"llm",
"inference",
"gguf",
"ai",
"ml",
]
categories = [
"science",
"algorithms",
]
license = "Apache-2.0 OR MIT"
repository = "https://github.com/hyeons-lab/cera"
[features]
avx512 = []
blas = [
"dep:cblas-sys",
"dep:accelerate-src",
"dep:openblas-src",
]
default = [
"parallel",
"mmap",
"std-fs",
"disk-cache",
"vl-preprocess",
"avx512",
]
disk-cache = ["std-fs"]
gpu = [
"dep:wgpu",
"dep:pollster",
"dep:futures-channel",
]
metal = [
"dep:metal",
"dep:objc",
"mmap",
]
mmap = [
"dep:memmap2",
"std-fs",
]
parallel = ["dep:rayon"]
remote = [
"dep:reqwest",
"dep:sha2",
"std-fs",
]
std-fs = []
vl-preprocess = ["dep:image"]
[lib]
name = "cera"
path = "src/lib.rs"
[[test]]
name = "attention_metal_parity"
path = "tests/attention_metal_parity.rs"
[[test]]
name = "bench_conv2d"
path = "tests/bench_conv2d.rs"
[[test]]
name = "bench_perf"
path = "tests/bench_perf.rs"
[[test]]
name = "blas_correctness"
path = "tests/blas_correctness.rs"
[[test]]
name = "blas_parity"
path = "tests/blas_parity.rs"
[[test]]
name = "bundle_download"
path = "tests/bundle_download.rs"
[[test]]
name = "bundle_from_id"
path = "tests/bundle_from_id.rs"
[[test]]
name = "cancel_mid_prefill"
path = "tests/cancel_mid_prefill.rs"
[[test]]
name = "depthformer_effect"
path = "tests/depthformer_effect.rs"
[[test]]
name = "depthformer_sensitivity"
path = "tests/depthformer_sensitivity.rs"
[[test]]
name = "depthformer_smoke"
path = "tests/depthformer_smoke.rs"
[[test]]
name = "detok_bypass"
path = "tests/detok_bypass.rs"
[[test]]
name = "detok_metal_parity"
path = "tests/detok_metal_parity.rs"
[[test]]
name = "detokenize_smoke"
path = "tests/detokenize_smoke.rs"
[[test]]
name = "embedding_roundtrip"
path = "tests/embedding_roundtrip.rs"
[[test]]
name = "engine_load"
path = "tests/engine_load.rs"
[[test]]
name = "frame2_codes"
path = "tests/frame2_codes.rs"
[[test]]
name = "gemv_q4_0_bench"
path = "tests/gemv_q4_0_bench.rs"
[[test]]
name = "gpu_transformer_parity"
path = "tests/gpu_transformer_parity.rs"
[[test]]
name = "grammar"
path = "tests/grammar.rs"
[[test]]
name = "hidden_states_parity"
path = "tests/hidden_states_parity.rs"
[[test]]
name = "layer0_compare"
path = "tests/layer0_compare.rs"
[[test]]
name = "list_bundles_live"
path = "tests/list_bundles_live.rs"
[[test]]
name = "llama_batched_prefill_parity"
path = "tests/llama_batched_prefill_parity.rs"
[[test]]
name = "llm_layer0_compare"
path = "tests/llm_layer0_compare.rs"
[[test]]
name = "lora_metal_parity"
path = "tests/lora_metal_parity.rs"
[[test]]
name = "lora_parity"
path = "tests/lora_parity.rs"
[[test]]
name = "lora_wgpu_parity"
path = "tests/lora_wgpu_parity.rs"
[[test]]
name = "manifest_parse"
path = "tests/manifest_parse.rs"
[[test]]
name = "metal_kv_shift_oracle"
path = "tests/metal_kv_shift_oracle.rs"
[[test]]
name = "metal_shaders_parity"
path = "tests/metal_shaders_parity.rs"
[[test]]
name = "n_keep_shift"
path = "tests/n_keep_shift.rs"
[[test]]
name = "oracle_text"
path = "tests/oracle_text.rs"
[[test]]
name = "quality_gate"
path = "tests/quality_gate.rs"
[[test]]
name = "sample_frame_smoke"
path = "tests/sample_frame_smoke.rs"
[[test]]
name = "session_chain"
path = "tests/session_chain.rs"
[[test]]
name = "shift_real_model"
path = "tests/shift_real_model.rs"
[[test]]
name = "single_token_attn"
path = "tests/single_token_attn.rs"
[[test]]
name = "tools_generate"
path = "tests/tools_generate.rs"
[[test]]
name = "tools_template"
path = "tests/tools_template.rs"
[[test]]
name = "vit_encode_bench"
path = "tests/vit_encode_bench.rs"
[[test]]
name = "vl_bundle_load"
path = "tests/vl_bundle_load.rs"
[[test]]
name = "vl_clip_parity"
path = "tests/vl_clip_parity.rs"
[[test]]
name = "vocoder_load"
path = "tests/vocoder_load.rs"
[[test]]
name = "wgpu_kv_shift_oracle"
path = "tests/wgpu_kv_shift_oracle.rs"
[dependencies.anyhow]
version = "1"
[dependencies.bytemuck]
version = "1"
features = ["derive"]
[dependencies.byteorder]
version = "1"
[dependencies.cblas-sys]
version = "0.1"
optional = true
[dependencies.flatbuffers]
version = "25"
[dependencies.futures-channel]
version = "0.3"
optional = true
[dependencies.half]
version = "2"
features = ["bytemuck"]
[dependencies.image]
version = "0.25"
features = [
"png",
"jpeg",
]
optional = true
default-features = false
[dependencies.memmap2]
version = "0.9"
optional = true
[dependencies.metal]
version = "0.31"
optional = true
[dependencies.minijinja]
version = "2"
features = ["json"]
[dependencies.objc]
version = "0.2"
optional = true
[dependencies.pollster]
version = "0.4"
optional = true
[dependencies.rand]
version = "0.8"
[dependencies.rayon]
version = "1"
optional = true
[dependencies.regex]
version = "1"
[dependencies.reqwest]
version = "0.12"
features = [
"blocking",
"rustls-tls",
]
optional = true
default-features = false
[dependencies.rustfft]
version = "6.4"
[dependencies.serde]
version = "1"
features = ["derive"]
[dependencies.serde_json]
version = "1"
[dependencies.sha2]
version = "0.10"
optional = true
[dependencies.thiserror]
version = "2"
[dependencies.tracing]
version = "0.1"
[dependencies.wgpu]
version = "24"
optional = true
[dev-dependencies.tempfile]
version = "3"
[dev-dependencies.tracing-subscriber]
version = "0.3"
features = ["env-filter"]
[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies.getrandom]
version = "0.2"
features = ["js"]
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies.accelerate-src]
version = "0.3"
optional = true
[target.'cfg(not(any(target_os = "macos", target_os = "ios")))'.dependencies.openblas-src]
version = "0.10"
features = ["system"]
optional = true
[target.'cfg(target_arch = "wasm32")'.dependencies.web-time]
version = "1"
[target.'cfg(target_arch = "wasm32")'.dependencies.wgpu]
version = "24"
features = ["fragile-send-sync-non-atomic-wasm"]
optional = true