Skip to content
MuaraAIPublic

About

Mora (.mr) - AI-first programming language with compile-time tensor shape checking, reverse-mode autograd, native C99 auto-SIMD AOT, GGUF, and structured agent primitives by MuaraAI

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Mora Programming Language

Mora (.mr)

Language: English | Bahasa Indonesia

Mora is a programming language by MuaraAI (v0.1.0, Apache-2.0) built for writing AI agents, MCP servers, and CPU tensor programs in plain .mr files. It catches matrix shape mismatches before your code runs, builds structured LLM outputs (schema and llm.ask / llm.stream), concurrency (spawn and join), embedded SQLite + vector store (db.*), and MCP servers (mcp.*) directly into the language, compiling either to a standalone app binary (~4.24 MiB) or a ~49 KiB native C99 executable.

Why Mora Exists: Problem and Solution

Building AI agents and tensor code today usually forces you into one of three compromises.

First, Python scripts are concise to write, yet shape bugs sit silent until runtime, often right after weights finish loading or an API request runs. Shipping a small Python CLI agent also drags in the Python interpreter, virtual environments, and ~60+ MiB of peak memory.

Second, compiled languages like Go, Rust, or compiled TypeScript give you real binaries, yet they offer no static tensor shape checking. Writing typed LLM calls with JSON schema validation, retry loops, concurrency, and matrix math takes roughly 200 to 300+ lines of glue code.

Third, heavy compute stacks like PyTorch CPU, Julia, or Mojo carry multi-hundred-megabyte memory footprints, cold JIT delays, or external shared libraries when you only need a small offline CPU binary.

Mora solves all three from one small .mr codebase. Before running anything, mora check verifies matrix dimensions symbolically (Batch, D) and rejects bad call sites in milliseconds:

fn linear_relu(
    x: f32[Batch, 512],
    w: f32[512, 256],
    b: f32[256]
) -> f32[Batch, 256] {
    let hidden = x @ w + b
    return relu(hidden)
}

fn main() {
    let input = zeros(4, 512)
    let weights = rand(256, 128) // wrong shape for w
    let bias = zeros(256)

    let features = linear_relu(input, weights, bias)
    print(features.shape)
}

Running mora check examples/shape_error_demo.mr rejects that mismatch immediately before execution (~2.2 ms):

error[E0301]: dimensi tensor tidak cocok pada parameter 'w' di 'linear_relu': mengharapkan f32[512, 256], ditemukan f32[256, 128]
  --> examples/shape_error_demo.mr:15:39
   |
15 |     let features = linear_relu(input, weights, bias)
   |                                       ^^^^^^^
  help: pastikan dimensi bernilai 512 (saat ini '256')

For agent and RAG workflows, you declare a schema, load vectors across explicit ?N runtime shape boundaries, retrieve with @, and get validated JSON structs without external packages (see examples/mini_rag.mr):

schema Answer {
    text: str
    confidence: f32
}

fn top_doc(docs: list[str], vecs: f32[N, D], q: f32[D]) -> str {
    let scores = vecs @ q
    return docs[argmax(scores)]
}

fn main() {
    let docs = ["Store opens 8-17", "Returns within 7 days", "Free local shipping"]
    let vecs: f32[?N, 1536] = llm.embed(docs)
    let q: f32[1536] = llm.embed_one("can I return an item?")
    let ctx = top_doc(docs, vecs, q)

    let ans: Answer = llm.ask("Answer using context: " + ctx, Answer)
    print(ans.text)
}

Who Should Use Mora (and Honest v0.1 Limits)

Mora v0.1 fits well if you are building:

  1. CLI AI agents, MCP servers, and AI Second Brain tools: compiles to a standalone binary (~4.24 MiB with bundled SQLite included) with llm.ask schema retries, llm.stream SSE streaming, cooperative spawn/join, persistent HTTP/1.1 keep-alive pooling, multi-worker http.serve, embedded SQLite + vector store (db.*), and first-class mcp.* stdio/HTTP MCP servers (6.03 ms IDE cold start in Suite 3 benchmarks).
  2. Offline CPU/GPU inference, training & quantized GGUF tools: mora build --native turns .mr tensor code, reverse-mode autograd loops, and GGUF loaders (F32, F16, BF16, Q8_0, Q4_0, Q4_K/Q4_K_M, Q6_K) into a ~49.4–74 KiB dependency-free executable using multi-core pthread and AVX2/FMA or ARM NEON (6.30 ms min for 400-step XOR training in native C99), while --gpu=vulkan adds zero-header live Vulkan 1.0 SPIR-V GPU offloading (63.2 KiB ELF) and --gpu=cuda/--gpu=metal emit CUDA/Metal runtimes & kernels.
  3. Math kernels called from C or Python: check tensor shapes in .mr, then export .so + .h headers via mora build --shared --emit-header for C, Rust, or Python ctypes.
  4. Projects written with AI coding agents: short SKILL.md rules, machine-readable mora check --json diagnostics, mora fmt, and mora lsp help coding agents verify tensor dimensions before running code.

Keep these v0.1 limits in mind before picking Mora for a workload:

  • --gpu=vulkan runs live Vulkan 1.0 SPIR-V compute kernels (with automatic MORA_GPU=0 CPU fallback), and --gpu=cuda/--gpu=metal emit standalone .cu/.mm host+kernel code (compiling CUDA or Metal binaries requires nvcc or macOS Xcode SDK). Distributed multi-GPU training and high-throughput LLM GPU serving still belong in PyTorch, JAX, or dedicated inference engines.
  • Agent runtime modules (llm.*, http.*, mcp.*, db.*, fs.*, str.*, time.*, io.*, non-literal json.*, py.*, gguf.save, spawn/join, try/catch, list[T]) run in the Interpreter and mora build bundler; calling them under --vm, --native, or --shared stops cleanly at compile time with diagnostic E0501.
  • On Windows x86_64, the mora.exe CLI and runtime work natively, while C99 native compilation (--native / --shared) currently needs MinGW-w64, MSYS2, or WSL because emitted C code uses <pthread.h>.

What Mora Is Built With

The mora toolchain and runtime are written in Rust (edition 2021) (src/, 29 modules) compiled with opt-level = "z", fat LTO, single codegen unit, panic = "abort", and stripped symbols, yielding a 4,588,320 B (~4.38 MiB) release binary including embedded SQLite and pre-validated SPIR-V 1.0 shaders (Cargo.toml).

Only 6 direct crate dependencies sit in Cargo.toml:

  • clap (CLI argument parsing; mora run and bundled executables bypass clap on the hot startup path)
  • serde and serde_json (JSON serialization, structured --json diagnostics, schema checking, MCP JSON-RPC, and LSP 3.17 framing)
  • tokio (single-threaded LocalSet async I/O runtime driving spawn/join and optional multi-worker http.serve / mcp.serve_http)
  • reqwest with rustls-tls (pure-Rust TLS + connection pooling for https://, zero OpenSSL system dependency; plain http:// uses a direct keep-alive TcpStream pool)
  • rusqlite with bundled SQLite (db.* embedded WAL persistence and raw f32 vector BLOB storage with zero external DB server)

Optional external tools used only when requested:

  • A C99 compiler (cc, gcc, or clang) when running mora build --native or --shared
  • python3 only if your script invokes py.eval or py.call

Architecture

One frontend parser, transitive module resolver (import "./path.mr" with file:line source mapping), and static type/shape checker feed three execution backends plus developer tooling:

.mr source files (import "./mod.mr")
  |
  v
[Frontend]         lexer.rs -> parser.rs -> module_loader.rs (source map: file:line)
  |
  v
[Static Checker]   checker.rs + types.rs (symbolic shapes, ?N bounds, E0101..E0309)
  |
  +--> [1. Interpreter & Bundler]  `mora run` / `mora build`
  |      interpreter.rs + runtime.rs + autograd.rs + py_bridge.rs + gguf.rs + bundler.rs
  |      Full language + Tokio LocalSet I/O + fast HTTP/1.1 path (~3.15 MB app binary)
  |
  +--> [2. Register Bytecode VM]   `mora run --vm`
  |      ir.rs -> arena_planner.rs (O(1) ARENA_MARK / RESET) -> vm.rs
  |      Runs tensor, Transformer, env.*, and GGUF load without Tokio or a C compiler
  |
  +--> [3. Native C99, GPU & FFI] `mora build --native` / `--gpu` / `--shared` / `--emit-c`
  |      ir.rs -> gpu.rs -> arena_planner.rs -> codegen_native.rs -> cc / Vulkan / CUDA / Metal
  |      ~49 KiB native ELF (AVX2/NEON), ~63 KiB Vulkan GPU ELF, or C ABI .so + .h header
  |
  +--> [Tooling]                   `mora fmt` (fmt.rs) | `mora test` (cli.rs) | `mora lsp` (lsp.rs)
Execution Path Command Best Used For Unsupported Features
Interpreter & Bundler mora run, mora build AI agents, llm.*, http.serve, autograd.*, py.*, gguf.save None (full language)
Bytecode VM mora run --vm Fast startup for tensors, Transformer ops, autograd, and GGUF without cc Rejected at compile (E0501)
Native C99 & GPU AOT mora build --native, --gpu, --shared Peak CPU (~49–74 KiB ELF), Vulkan live GPU (--gpu=vulkan), .so/.h Rejected at compile (E0501)

Project Structure

Mora/
|-- src/                          Rust compiler, runtime, VM, C99 AOT backend, and LSP
|   |-- lexer.rs, token.rs        Tokenizer and token definitions
|   |-- ast.rs, parser.rs         Brace syntax AST and recursive-descent parser
|   |-- span.rs, module_loader.rs Multi-file `import` resolver with DFS deduplication & source maps
|   |-- types.rs, checker.rs      Tensor shape unifier, ?N boundary rules, diagnostic checks
|   |-- diagnostic.rs             Human and `--json` error formatter (E0101..E0501)
|   |-- interpreter.rs            Tree-walking evaluator and Tokio LocalSet / HTTP worker coordinator
|   |-- runtime.rs                `llm.*` (incl. SSE `llm.stream`), `http.*` keep-alive pool, `json`, `env`
|   |-- db.rs, mcp.rs             Embedded WAL SQLite + `f32` vector BLOBs (`db.*`) and stdio/HTTP MCP server (`mcp.*`)
|   |-- tensor.rs, autograd.rs    CPU f32 kernels, cosine/Top-K, 7 Transformer ops, reverse-mode autograd
|   |-- gguf.rs, py_bridge.rs     GGUF v2/v3 loader/saver (`F32/F16/BF16/Q8_0/Q4_0/Q4_K/Q6_K`) and Python bridge
|   |-- ir.rs, arena_planner.rs   Register Mora IR lowering and O(1) loop-safe arena lifetimes
|   |-- gpu.rs                    GPU subgraph fusion pass (`GPU_MATMUL_FUSED`), SPIR-V 1.0 Vulkan runtime, CUDA/Metal emitters
|   |-- vm.rs, codegen_native.rs  Register Bytecode VM and multi-core SIMD/GPU C99 code generator
|   |-- bundler.rs                Single-binary trailer packer for `mora build`
|   `-- cli.rs, fmt.rs, lsp.rs    Zero-clap hot CLI dispatch, canonical formatter, LSP 3.17 server
|-- tests/integration.rs          30 end-to-end compiler, VM, C99 AOT, Vulkan GPU, K-quant, autograd, SQLite, MCP, and agent tests
|-- docs/                         Bilingual guides (`*.md` EN and `*_ID.md` ID, 9 pairs)
|-- examples/                     Verified `.mr` programs, `tiny_llm/`, `second_brain_mcp.mr`, `streaming_agent.mr`, and `compare/` suites
|-- editors/                      Extensions and setups for VS Code, Antigravity, Zed, FluxCode, Neovim, Helix, Sublime, Emacs
|-- packaging/                    `.deb`, Arch `pacman`, AUR `PKGBUILD`, Inno Setup `.iss`, Homebrew tap template
|-- skills/ & SKILL.md            Agent Skills modules (`mora`, `mora-lang`, `mora-agents`, `mora-native`, `mora-compiler`)
|-- assets/brand/                 7 Graphite & Vermilion SVG brand marks and README banner
|-- evals/                        Blind AI coding agent benchmark tasks (`tasks.md`, `tasks_ID.md`)
|-- .github/                      CI checks, core-team PR policy, multi-platform Release workflow
`-- install.sh, install.ps1       1-command binary installers for Linux, macOS, and Windows

Install and Common Commands

Prebuilt Installers (Linux, macOS, Windows)

On Linux and macOS (x86_64 and ARM64), run:

curl -fsSL https://raw.githubusercontent.com/MuaraAI/Mora/main/install.sh | sh

On Windows (x86_64 PowerShell, adds binary directory to User PATH):

irm https://raw.githubusercontent.com/MuaraAI/Mora/main/install.ps1 | iex

You can also download the Windows 1-click GUI setup (mora-0.1.0-setup-x86_64.exe), Debian/Ubuntu .deb (amd64 or arm64), Arch pacman package (.pkg.tar.zst), or .tar.gz archives directly from GitHub Releases (details in packaging/README.md).

Build from Source

Requires Rust (optional cc/gcc/clang for --native/--shared and python3 for py.*):

cargo build --release

Common workflows after installing or building:

# Type and shape checking without execution
./target/release/mora check examples/linear_relu.mr
./target/release/mora check examples/shape_error_demo.mr
./target/release/mora check examples/shape_error_demo.mr --json

# Run with Interpreter or Bytecode VM (--vm)
./target/release/mora run examples/linear_relu.mr
./target/release/mora run examples/mlp_bench.mr --vm

# Offline autograd training & Python bridge
./target/release/mora run examples/train_xor.mr
./target/release/mora run examples/interop_python.mr

# LLM, Mini-RAG & parallel agents (auto-loads examples/.env; copy examples/.env.example)
export MORA_LLM_API_KEY="your-api-key"
export MORA_LLM_BASE_URL="https://api.openai.com/v1"
export MORA_LLM_MODEL="gpt-4o-mini"
export MORA_EMBED_MODEL="text-embedding-3-small"
./target/release/mora run examples/mini_rag.mr --trace
./target/release/mora run examples/parallel_agents.mr

# Bundle modules + runtime into one standalone executable
./target/release/mora build examples/linear_relu.mr -o ./linear_relu_app
./linear_relu_app

# Native C99 Auto-SIMD AOT (--native), live Vulkan GPU (--gpu=vulkan), portable binary, and C shared library (--shared)
./target/release/mora ir examples/mlp_bench.mr --gpu=vulkan
./target/release/mora build examples/mlp_bench.mr -o ./mlp_native --native
./target/release/mora build examples/mlp_bench.mr -o ./mlp_gpu --native --gpu=vulkan
./target/release/mora build examples/mlp_bench.mr -o ./mlp_portable --native --portable
./target/release/mora build examples/native_kernel.mr -o ./libkernel.so --shared --emit-header ./kernel.h
./target/release/mora build examples/linear_relu.mr -o ./linear_relu.c --emit-c
MORA_GPU_TRACE=1 ./mlp_gpu

# Offline GGUF inference & multi-file Tiny Transformer
MORA_GGUF_PATH="./model.gguf" ./target/release/mora run examples/local_gguf_inference.mr
./target/release/mora run examples/tiny_llm/main.mr --vm
./target/release/mora build examples/tiny_llm/main.mr -o ./tiny_llm_native --native
MORA_NUM_THREADS=4 ./tiny_llm_native
./target/release/mora run examples/checkpoint_gguf.mr

# Formatting, built-in unit tests, HTTP server, and LSP 3.17
./target/release/mora fmt examples/*.mr examples/tiny_llm/*.mr
./target/release/mora fmt --check examples/*.mr examples/tiny_llm/*.mr
./target/release/mora test examples/tests_demo.mr
./target/release/mora test examples/tests_demo.mr --json
MORA_ADDR="127.0.0.1:8080" ./target/release/mora run examples/agent_api.mr
./target/release/mora lsp

Measured Benchmarks

All numbers below were measured on x86_64 Linux (Intel(R) Core(TM) i5-6300U CPU @ 2.40GHz, 2 cores / 4 threads, AVX2/FMA, GCC 16.2.1) using a C posix_spawnp + wait4 harness (CLOCK_MONOTONIC wall clock and child-only ru_maxrss). The current Phase 2 release mora binary (with embedded SQLite, MCP, K-quants, autograd, and SPIR-V 1.0 shaders) measures 4,588,320 B (~4.38 MiB), cargo test --offline passes 75 unit + 30 integration tests, and blind AI agent evaluation passed 5/5 tasks using only SKILL.md (evals/tasks.md). (Suites 1 & 2 below retain the exact recorded v0.1.0 baseline measurements; Suite 3 and live Vulkan GPU scaling in docs/benchmarks.md reflect subsequent releases.)

1. AI Agent and Hybrid Tensor-RAG (5 Languages / 8 Targets)

Workload: batch embedding of 4 documents (?N x ?D), vecs @ q / argmax retrieval, and 3 concurrent llm.ask requests with strict TriageAnswer JSON schema checks and retries. Full report: examples/compare/README.md and docs/benchmarks.md.

Mora vs Bun vs Go vs Rust vs Node vs Python AI Agent Benchmark

Target LOC (code / total) Binary / Package Shape Bug ([4,512]@[256,128]) Offline delay=0 (5 runs avg) Peak RSS Max (delay=0) Offline delay=40 (3 runs avg)
mora_bundle (mora build) 44 / 50 3,150,929 B (~3.00 MiB) Compile-time (E0301, 2.2 ms) 6.94 ms 5,128 KiB 57.24 ms
mora_run (mora run) 44 / 50 Shared mora CLI Compile-time (E0301, 2.2 ms) 7.87 ms 5,068 KiB 50.03 ms
rust_release (tokio+reqwest) 267 / 285 5,097,848 B (131 crates) Runtime (Vec<Vec<f32>>) 179.71 ms 4,808 KiB 219.14 ms
go_release (net/http) 316 / 345 6,766,855 B Runtime panic (exit 2) 182.23 ms 14,416 KiB 228.10 ms
bun_compile (bun 1.4.5 --compile) 228 / 246 109,213,872 B (~104.2 MiB) Runtime (exit 1) 207.98 ms 31,332 KiB 254.39 ms
bun_ts (bun run) 228 / 246 Bun 1.4.5 runtime Runtime (exit 1) 273.36 ms 39,148 KiB 231.92 ms
node_ts (node v26.13.1) 228 / 246 Node v26 runtime Runtime (exit 1) 311.80 ms 104,184 KiB 378.19 ms
python (3.14+httpx+numpy) 160 / 183 Python venv + 3 PyPI Runtime (exit 1) 791.68 ms 60,576 KiB 858.43 ms

2. Local Tensor Compute (--native vs Mojo 1.2, Julia 1.13, C99, NumPy, PyTorch CPU, --vm)

Workload: deterministic 80-step 2-layer MLP (64x512 -> 512x512 SiLU -> 512x256 ReLU, ~4.03 GFLOPs f32) with strict numerical checksum parity (~22.657, tolerance < 1e-2). Full report: examples/compare/compute/README.md and docs/benchmarks.md.

Mora Native vs Mojo, Julia, C99, NumPy and PyTorch Compute Benchmark

Target LOC Binary / Runtime Shape Bug ([64,512]@[256,256]) Avg Time (5 runs) Peak RSS Max Checksum
mora_native (--native) 26 / 28 50,408 B (~49.2 KiB ELF) Compile-time (E0301, 2.56 ms) 356.56 ms 8,668 KiB 22.656700
mojo_native (mojo 1.2.0 1T SIMD) 99 / 119 63,152 B + 3 Modular .so Manual pointer index 416.81 ms 18,772 KiB 22.656755
mora_native_1t (MORA_NUM_THREADS=1) 26 / 28 50,408 B (~49.2 KiB ELF) Compile-time (E0301) 422.65 ms 8,564 KiB 22.656700
numpy (2.5.4 OpenBLAS) 26 / 37 Python + OpenBLAS Runtime error 785.05 ms 40,084 KiB 22.657161
c99_o3 (gcc 16.2.1 -O3 -march=native) 99 / 112 16,288 B ELF Manual loop index 1,089.77 ms 4,160 KiB 22.657182
julia (1.13.4 cold JIT, 3 runs) 31 / 39 Julia JIT + depot Runtime error 3,218.25 ms 321,308 KiB 22.657144
pytorch_cpu (2.15.0+cpu) 27 / 38 Python + Torch CPU Runtime error 3,731.35 ms 254,612 KiB 22.657185
mora_vm (mora run --vm, 1 run) 26 / 28 Shared mora CLI Compile-time (E0301) 11,571.36 ms 8,596 KiB 22.656294

3. AI Second Brain + MCP Server (5 Languages / 8 Targets)

Workload: stdio MCP JSON-RPC 2.0 server backed by real SQLite WAL persistence + 8-dim f32 vector BLOB storage + cosine similarity Top-K search (save_note and search_notes). Scenario A measures IDE MCP cold-start (initialize + tools/list), and Scenario B executes 33 JSON-RPC messages (20x save_note + 10x search_notes with strict Top-K parity verified on every run). Full report: examples/compare/mcp/README.md and docs/benchmarks.md.

Mora vs Rust vs Go vs Bun vs Node vs Python AI Second Brain MCP Benchmark

Target LOC (code / total) Binary / External Deps Cold Start (5 runs) Cold RSS Max Full 33-msg Session Session RSS Max
mora_bundle (mora build) 92 / 103 4,447,447 B (0 pkgs) 6.03 ms 6,508 KiB 24.93 ms 7,536 KiB
mora_run (mora run) 92 / 103 Shared mora CLI 6.89 ms 6,556 KiB 32.94 ms 7,400 KiB
rust_release (rusqlite) 343 / 366 1,448,888 B (3 crates) 3.50 ms 3,548 KiB 6.62 ms 3,476 KiB
go_release (CGo libsqlite3) 327 / 363 2,668,856 B (links .so) 8.80 ms 10,728 KiB 14.20 ms 10,984 KiB
bun_compile (bun:sqlite) 211 / 224 109,213,872 B (0 pkgs) 50.89 ms 35,144 KiB 54.51 ms 40,776 KiB
bun_ts (bun run) 211 / 224 Bun 1.4.5 runtime 94.53 ms 38,096 KiB 69.08 ms 43,428 KiB
python (stdlib sqlite3) 166 / 190 Python 3.14 runtime 113.40 ms 14,552 KiB 132.17 ms 14,860 KiB
node_ts (node:sqlite) 211 / 224 Node v26 runtime 312.81 ms 80,616 KiB 327.96 ms 82,672 KiB

Documentation Hub

Every guide ships in English and Bahasa Indonesia (*_ID.md). Agent Skills (SKILL.md, skills/*/SKILL.md) stay in English for cross-model compatibility.

Guide English Bahasa Indonesia Focus
Documentation Hub docs/README.md docs/README_ID.md Reading paths & complete index
Getting Started docs/getting-started.md docs/getting-started_ID.md Source build, 5-minute tour, .env setup
Language Guide docs/language-guide.md docs/language-guide_ID.md { } syntax, CoW semantics, import, test, fmt
Tensors, Transformer & Autograd docs/tensors-and-autograd.md docs/tensors-and-autograd_ID.md Shape rules, ?N, @, 7 Transformer ops, autograd, GGUF
AI Agents & Stdlib docs/agents-and-stdlib.md docs/agents-and-stdlib_ID.md llm.* (llm.stream), mcp.*, db.*, keep-alive http.*, str.*, fs.*, py.*
Native AOT, GPU, VM & C FFI docs/native-aot-and-vm.md docs/native-aot-and-vm_ID.md Mora IR, GPU fusion (--gpu), O(1) Arena Planner, --vm, --native, --shared, extern fn
CLI, Diagnostics & LSP docs/cli-and-diagnostics.md docs/cli-and-diagnostics_ID.md Flags (--gpu, --emit-gpu), --json, --trace, E0101–E0501, LSP 3.17
Benchmarks & Methodology docs/benchmarks.md docs/benchmarks_ID.md Suite 1 Agent, Suite 2 Compute (+ Vulkan GPU), and Suite 3 MCP Server reports
Scope & Roadmap docs/roadmap.md docs/roadmap_ID.md Phases 1-2 complete, honest limits, and Phase 3 < 1 MB mora-rt slim runtime plan
Editor Integrations editors/README.md editors/README_ID.md VS Code, Antigravity, Zed, FluxCode, Neovim, Helix, Sublime, Emacs
Brand & Design System DESIGN.md DESIGN_ID.md Graphite & Vermilion palette, WCAG 2.1 tokens, G1 logo specs

Example Programs

Example What It Demonstrates
examples/linear_relu.mr Neural network layer with compile-time shape verification (f32[Batch, 512] @ f32[512, 256])
examples/shape_error_demo.mr Intentional [4, 512] @ [256, 128] bug caught at mora check (E0301)
examples/mlp_bench.mr 50-step 2-layer MLP exercising Mora IR, O(1) arena loop resets, --vm, and --native
examples/train_xor.mr 2-layer MLP trained on XOR via autograd.reset/track/backward/grad/detach and mse_loss
examples/interop_python.mr Mora/Python bridge (py.call / py.eval) with schema and ?R tensor validation
examples/native_kernel.mr Native compute kernel exported to .so + .h (--shared --emit-header) for C or ctypes
examples/local_gguf_inference.mr Offline inference reading quantized GGUF weights (F32, F16, BF16, Q8_0, Q4_0)
examples/checkpoint_gguf.mr GGUF checkpoint save/upsert, gguf.set_meta, fs.* logging, and reload validation
examples/tiny_llm/layers.mr & main.mr Multi-file Tiny Transformer (causal_attention prefill, KV-cache decode) across --vm and --native
examples/tests_demo.mr Isolated test "name" { ... } blocks with assert, assert_eq, and assert_near
examples/mini_rag.mr Batch embedding, vector retrieval (vecs @ q), and structured llm.ask(..., Answer)
examples/parallel_agents.mr 50 concurrent llm.ask tasks coordinated with spawn and join
examples/agent_api.mr Concurrent HTTP API server (/health, /ask, /batch) built on http.serve
examples/second_brain_mcp.mr AI Second Brain + first-class stdio/HTTP MCP server backed by db.* SQLite + cosine topk
examples/streaming_agent.mr SSE token streaming (llm.stream stdout & callback) and multi-worker http.serve
examples/compare/, compute/ & mcp/ Reproducible harnesses for all three 8-target benchmark suites

Brand Marks, Agent Files, and Governance

Primary Mark .mr File Icon Adaptive Wordmark (Dark / Light)
Mora Mark Mora File Icon Mora Wordmark
mora-mark.svg mora-file-icon.svg All 7 official SVGs (DESIGN.md)

About

Mora (.mr) - AI-first programming language with compile-time tensor shape checking, reverse-mode autograd, native C99 auto-SIMD AOT, GGUF, and structured agent primitives by MuaraAI

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages