[package]
edition = "2024"
rust-version = "1.94"
name = "cera"
version = "0.5.0"
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",
]
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"
[[example]]
name = "embedder_path"
path = "examples/embedder_path.rs"
required-features = [
"mmap",
"parallel",
]
[[example]]
name = "slang_elementwise_bench"
path = "examples/slang_elementwise_bench.rs"
required-features = ["metal"]
[[example]]
name = "slang_gemm_bench"
path = "examples/slang_gemm_bench.rs"
required-features = ["metal"]
[[example]]
name = "wgpu_gemm_bench"
path = "examples/wgpu_gemm_bench.rs"
required-features = ["gpu"]
[[example]]
name = "wgpu_gemv_bench"
path = "examples/wgpu_gemv_bench.rs"
required-features = ["gpu"]
[[test]]
name = "attention_metal_parity"
path = "tests/attention_metal_parity.rs"
[[test]]
name = "audio_encoder_metal_parity"
path = "tests/audio_encoder_metal_parity.rs"
[[test]]
name = "audio_interleaved_regression"
path = "tests/audio_interleaved_regression.rs"
[[test]]
name = "avx2_decode_prefill_identity"
path = "tests/avx2_decode_prefill_identity.rs"
[[test]]
name = "avx512_quantizer_gate"
path = "tests/avx512_quantizer_gate.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 = "browser_codes_replay"
path = "tests/browser_codes_replay.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_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 = "detok_wasm_reference"
path = "tests/detok_wasm_reference.rs"
[[test]]
name = "detok_wgpu_parity"
path = "tests/detok_wgpu_parity.rs"
[[test]]
name = "detokenize_smoke"
path = "tests/detokenize_smoke.rs"
[[test]]
name = "dspark_sidecar_validation"
path = "tests/dspark_sidecar_validation.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 = "from_parts_vl"
path = "tests/from_parts_vl.rs"
[[test]]
name = "gemv_q4_0_bench"
path = "tests/gemv_q4_0_bench.rs"
[[test]]
name = "gpu_lfm2_decode_passes"
path = "tests/gpu_lfm2_decode_passes.rs"
[[test]]
name = "gpu_lfm2_embedding_input"
path = "tests/gpu_lfm2_embedding_input.rs"
[[test]]
name = "gpu_lfm2_embedding_readbacks"
path = "tests/gpu_lfm2_embedding_readbacks.rs"
[[test]]
name = "gpu_lfm2_greedy_submits"
path = "tests/gpu_lfm2_greedy_submits.rs"
[[test]]
name = "gpu_lfm2_prefill_dispatch"
path = "tests/gpu_lfm2_prefill_dispatch.rs"
[[test]]
name = "gpu_lfm2_prefill_equivalence"
path = "tests/gpu_lfm2_prefill_equivalence.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 = "int8_gemm_gate"
path = "tests/int8_gemm_gate.rs"
[[test]]
name = "layer0_compare"
path = "tests/layer0_compare.rs"
[[test]]
name = "lfm2_batched_prefill_parity"
path = "tests/lfm2_batched_prefill_parity.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_moe_oracle"
path = "tests/metal_moe_oracle.rs"
[[test]]
name = "metal_params_layout"
path = "tests/metal_params_layout.rs"
[[test]]
name = "metal_shaders_parity"
path = "tests/metal_shaders_parity.rs"
[[test]]
name = "metal_turboquant_oracle"
path = "tests/metal_turboquant_oracle.rs"
[[test]]
name = "moe_grouped_gemm_parity"
path = "tests/moe_grouped_gemm_parity.rs"
[[test]]
name = "moe_lora_parity"
path = "tests/moe_lora_parity.rs"
[[test]]
name = "msl_postpass"
path = "tests/msl_postpass.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 = "semantic_anchor_integration"
path = "tests/semantic_anchor_integration.rs"
[[test]]
name = "session_chain"
path = "tests/session_chain.rs"
[[test]]
name = "shader_doc_attachment"
path = "tests/shader_doc_attachment.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 = "slang_multitarget_parity"
path = "tests/slang_multitarget_parity.rs"
[[test]]
name = "spec_decode_logits"
path = "tests/spec_decode_logits.rs"
[[test]]
name = "spec_lm_head_bench"
path = "tests/spec_lm_head_bench.rs"
[[test]]
name = "tools_generate"
path = "tests/tools_generate.rs"
[[test]]
name = "tools_template"
path = "tests/tools_template.rs"
[[test]]
name = "turboquant_cold_storage_parity"
path = "tests/turboquant_cold_storage_parity.rs"
[[test]]
name = "unbatchable_warning"
path = "tests/unbatchable_warning.rs"
[[test]]
name = "vad_oracle"
path = "tests/vad_oracle.rs"
[[test]]
name = "vit_encode_bench"
path = "tests/vit_encode_bench.rs"
[[test]]
name = "vit_metal_parity"
path = "tests/vit_metal_parity.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"
[[test]]
name = "wgpu_moe_oracle"
path = "tests/wgpu_moe_oracle.rs"
[[test]]
name = "wgpu_moe_prefill_dispatch"
path = "tests/wgpu_moe_prefill_dispatch.rs"
[[test]]
name = "wgpu_mul_mat_parity"
path = "tests/wgpu_mul_mat_parity.rs"
[[test]]
name = "wgpu_turboquant_oracle"
path = "tests/wgpu_turboquant_oracle.rs"
[dependencies.anyhow]
version = "1"
[dependencies.bytemuck]
version = "1"
features = ["derive"]
[dependencies.byteorder]
version = "1"
[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.minijinja-contrib]
version = "2"
features = ["pycompat"]
[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 = "30"
optional = true
[dev-dependencies.image]
version = "0.25"
features = ["png"]
default-features = false
[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 = "linux", target_os = "android"))'.dependencies.libc]
version = "0.2"
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies.accelerate-src]
version = "0.3"
optional = true
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies.cblas-sys]
version = "0.1"
optional = true
[target.'cfg(target_arch = "wasm32")'.dependencies.web-time]
version = "1"
[target.'cfg(target_arch = "wasm32")'.dependencies.wgpu]
version = "30"
features = ["fragile-send-sync-non-atomic-wasm"]
optional = true
[target.'cfg(target_arch = "wasm32")'.dev-dependencies.wasm-bindgen-test]
version = "0.3"