[package]
name = "axon-csys"
version = "0.2.0"
authors = ["AXON Project", "Bemarking AI S.A.S."]
edition = "2021"
rust-version = "1.95"
license = "MIT"
repository = "https://github.com/Bemarking/axon-lang"
readme = "README.md"
keywords = ["axon", "c23", "ffi", "kernel", "performance"]
categories = ["development-tools::ffi", "external-ffi-bindings"]
description = "axon-csys — Fase 25 (Silicon + Cognition sesión 1). C23 metal-bound kernels for axon-lang. The Rust crate hosts safe wrappers; the c-src/ tree hosts the kernels: cache-line-aligned slab allocator (25.d), G.711 mulaw + linear PCM resampler (25.c), algebraic effects FSM dispatcher with computed gotos (25.e), BPE tokenizer with #embed (25.g), HMAC-SHA256 continuity token (25.h), plus an adopter-facing C transpiler bridge (25.f). Each kernel ships with a byte-identical drift gate against the Rust reference impl. 25.b ships only the build-infrastructure probe; later sub-fases append their kernels."

[lib]
name = "axon_csys"
path = "src/lib.rs"

[dependencies]
# §Fase 25.g — fancy-regex provides PCRE-style possessive quantifiers
# (`++`, `?+`, `*+`) and lookaround (`(?!\S)`) that the cl100k_base /
# o200k_base pretokeniser patterns rely on. tiktoken-rs already pulled
# fancy-regex transitively; replacing tiktoken-rs with axon-csys keeps
# the same regex backend, drops the rest of the tiktoken-rs surface
# (HTTP downloads of merge tables at build time, the CoreBPE struct,
# its internal data structures). The result is one direct dep instead
# of one direct + many transitive.
fancy-regex = "0.13"

[build-dependencies]
# §Fase 25.b D3 — cc-rs is the de facto Rust ecosystem standard for
# C deps (used by `ring`, `openssl-sys`, `sodiumoxide`, etc); zero adopter
# setup; build script integrates into `cargo build` natively. Keep the
# version aligned with the rest of the cargo ecosystem (cc 1.2 supports
# C23 / `/std:clatest` flag handling).
cc = "1.2"

[dev-dependencies]
# §Fase 25.g — drift gate. Reference encoder for cross-validating
# axon-csys's BPE output against tiktoken's canonical implementation.
# Production builds DO NOT link tiktoken-rs (the whole point of 25.g
# was to remove the dep); it is only present in the test target.
tiktoken-rs = "0.6"
# §Fase 25.h — crypto drift gate. The Rust ecosystem reference impls
# for SHA-256 / HMAC / base64url-no-pad / constant-time compare. Not
# linked into production binaries — purely cross-validation against
# our in-house C kernel.
sha2 = "0.10"
hmac = "0.12"
base64 = "0.22"
subtle = "2"
# §Fase 25.j — fuzz drift gate uses a deterministic seedable RNG so
# CI runs are reproducible. Pinned to 0.9 to align with the prod
# `rand` dep already in axon-rs (no transitive bloat in axon-csys).
rand = { version = "0.9", default-features = false, features = ["std", "std_rng"] }
# §Fase 25.j — criterion drives the cross-stack benchmarks. The
# `html_reports` feature emits target/criterion/<bench>/index.html
# for visual inspection; CI lanes consume the JSON output for
# regression gating in 25.k.
criterion = { version = "0.5", default-features = false, features = ["html_reports", "cargo_bench_support"] }

# §Fase 25.j — bench registration. Each entry corresponds to a
# `benches/<name>.rs` file; `harness = false` lets criterion install
# its own runner (the cargo default is libtest, which doesn't know
# how to drive criterion's groups + sample-size logic).
[[bench]]
name = "sha256"
harness = false
[[bench]]
name = "hmac"
harness = false
[[bench]]
name = "base64"
harness = false
[[bench]]
name = "bpe"
harness = false
[[bench]]
name = "audio"
harness = false
[[bench]]
name = "buffer"
harness = false
[[bench]]
name = "effects"
harness = false
