Skip to content
Mardon-programmPublic

About

AI-native declarative programming language and cognitive runtime built in Rust. Integrates tensors, Bayesian beliefs, causal logic, vector memory, and self-modifying multi-agent architectures into a strict, high-performance compiler stack.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Apeiron

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.

Status

  • 20 crates; fmt, check, test, clippy, and doc are 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 RuntimeLimits with stable LIMIT0001–LIMIT0009 diagnostics.
  • 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.

Features

  • ffi (off by default) — resolve native externs declared in Apeiron.toml under [native.<name>] (library, symbol, signature, effects) and bind them alongside the standard library. Enabled by the CLI so apeiron build can call shared libraries through libloading.

  • faer (off by default) — back dense matrix multiplication in apeiron-runtime with the faer linear algebra library instead of the pure-Rust reference kernel:

    cargo test --workspace --features apeiron-runtime/faer

Quick start

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.

Structure

  • apeiron-core — diagnostics, spans, source mapping, extern declarations
  • apeiron-lexer — tokenization (comments preserved for formatting)
  • apeiron-ast — AST and language surface
  • apeiron-parser — concrete syntax → AST
  • apeiron-analyzer — type checking, symbols, diagnostics (AN0001..AN0022)
  • apeiron-ir — IR types/instructions/builder/lower/verify/optimize
  • apeiron-runtime — interpreter, memory, causal model, state, archive, resource limits, native externs (ffi)
  • apeiron-effects — effect/capability analysis and policy enforcement
  • apeiron-stdlib — builtins registry and implementations
  • apeiron-repl — interactive evaluator with session save/load/inspect
  • apeiron-manifest — Apeiron.toml loading/linking and [native.*] externs
  • apeiron-fmt — canonical formatter
  • apeiron-lsp — LSP server over stdio (JSON-RPC framing)
  • apeiron-cli — binary apeiron
  • apeiron-sdk — stable Rust embedding facade (Engine, structured outputs, policy)
  • apeiron-observability — metrics, logs, observers, SLO evaluation, Prometheus exporter
  • apeiron-registry — packages, version constraints, local registry, deterministic resolver
  • apeiron-conformance — golden fixtures, verification/stress tests, criterion pipeline and stress benches
  • apeiron-platform — planning, deterministic task scheduling, society message bus
  • apeiron-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.

Roadmap

See ROADMAP.md for the phased plan, what is implemented, and what remains blocked outside the repository.

License

Licensed under either of

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.

About

AI-native declarative programming language and cognitive runtime built in Rust. Integrates tensors, Bayesian beliefs, causal logic, vector memory, and self-modifying multi-agent architectures into a strict, high-performance compiler stack.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages