A language and cognitive runtime implementation. The workspace covers lexing, parsing, analysis, IR lowering/verification/optimization, execution, effects, builtins, a formatter, a REPL, a language server, project manifests, a package registry, conformance tests, observability, a Rust SDK, and a CLI.
- 20 crates;
fmt,check,test,clippy, anddocare clean for the workspace. - Reference-first interpreter with opt-in verifier-checked IR passes (
--opt). - Deterministic replay, versioned snapshots/state archives, seeded
random(). - Compile-time and call-time capability policy with a deterministic audit log.
- Deterministic
RuntimeLimitswith stableLIMIT0001–LIMIT0009diagnostics. - Generated stress corpus and logical CI thresholds; no wall-clock baseline gate.
- IDE-grade LSP features, stable formatter, lints, REPL sessions, JSON CLI output.
- Documentation site: docs/README.md.
- Community: CONTRIBUTING.md and CODE_OF_CONDUCT.md.
Known limits: the runtime is still an interpreter; FFI is a trusted in-process boundary; there is no JIT/AOT, OS sandbox, signed package distribution, parallel thread execution, or external SDK beyond Rust. See ROADMAP.md for honest phase status and blocked items.
-
ffi(off by default) — resolve native externs declared inApeiron.tomlunder[native.<name>](library,symbol,signature,effects) and bind them alongside the standard library. Enabled by the CLI soapeiron buildcan call shared libraries throughlibloading. -
faer(off by default) — back dense matrix multiplication inapeiron-runtimewith thefaerlinear algebra library instead of the pure-Rust reference kernel:cargo test --workspace --features apeiron-runtime/faer
cargo test --workspace
cargo run --quiet --package apeiron-cli -- run path/to/file.ape
cargo run --quiet --package apeiron-cli -- --opt check path/to/file.ape
cargo run --quiet --package apeiron-cli -- fmt path/to/file.ape
cargo run --quiet --package apeiron-cli -- repl
cargo run --quiet --package apeiron-cli -- run program.ape --seed 42 --trace-file run.json
cargo run --quiet --package apeiron-cli -- replay run.json
cargo run --quiet --package apeiron-cli -- run program.ape --metrics-file metrics.json
cargo run --quiet --package apeiron-cli -- --limits strict run program.ape
cargo run --quiet --package apeiron-cli -- --limit max-instructions=100000 run program.ape
cargo run --quiet --package apeiron-cli -- state save program.ape state.json --seed 42
cargo run --quiet --package apeiron-cli -- state load state.json
cargo run --quiet --package apeiron-cli -- build project/ --deny-effect network --audit-file audit.json
cargo run --quiet --package apeiron-cli -- test
cargo run --quiet --package apeiron-cli -- --json bench --iterations 100
cargo run --quiet --package apeiron-cli -- package init demo
cargo run --quiet --package apeiron-cli -- package resolve app.json registry/Most commands also accept the global --json flag.
apeiron-core— diagnostics, spans, source mapping, extern declarationsapeiron-lexer— tokenization (comments preserved for formatting)apeiron-ast— AST and language surfaceapeiron-parser— concrete syntax → ASTapeiron-analyzer— type checking, symbols, diagnostics (AN0001..AN0022)apeiron-ir— IR types/instructions/builder/lower/verify/optimizeapeiron-runtime— interpreter, memory, causal model, state, archive, resource limits, native externs (ffi)apeiron-effects— effect/capability analysis and policy enforcementapeiron-stdlib— builtins registry and implementationsapeiron-repl— interactive evaluator with session save/load/inspectapeiron-manifest—Apeiron.tomlloading/linking and[native.*]externsapeiron-fmt— canonical formatterapeiron-lsp— LSP server over stdio (JSON-RPC framing)apeiron-cli— binaryapeironapeiron-sdk— stable Rust embedding facade (Engine, structured outputs, policy)apeiron-observability— metrics, logs, observers, SLO evaluation, Prometheus exporterapeiron-registry— packages, version constraints, local registry, deterministic resolverapeiron-conformance— golden fixtures, verification/stress tests, criterion pipeline and stress benchesapeiron-platform— planning, deterministic task scheduling, society message busapeiron-adapters— model/tool traits, deterministic mocks, capability-labelled call logs
Guides and specifications: docs index, embedding, observability, snapshot v1, execution record v1, state archive v1, effect policy v1, runtime limits v1.
See ROADMAP.md for the phased plan, what is implemented, and what remains blocked outside the repository.
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT license (LICENSE-MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project will be licensed under the same dual license as above.