A typed actor language for reliable
distributed systems and AI agents.
Compiles to WASM. Rust runtime. Real processes, supervision, and LLM effects.
-- A typed web server with process-based concurrency
type Request =
| Get(String)
| Post(String, Body)
type Response =
| Ok(Body)
| NotFound
| Error(String)
fn handle(req: Request) -> Response = match req with
| Get("/health") -> Ok("ok")
| Get(path) -> lookup(path)
| Post(path, body) -> store(path, body)
fn counter(count: Int) -> Int = receive
| Increment(n) -> counter(count + n)
| GetCount -> count
| Shutdown -> count
fn main() -> Result[Unit, Error] =
let pid = spawn(counter, 0)
let server = listen(8080, handle)
supervise([pid, server], OneForOne) Erlang-style lightweight processes with typed message passing. Each process is an isolated WASM instance with its own mailbox.
Compiles to WebAssembly, runs on a Rust runtime with wasmtime. No garbage collector — ownership and linear types manage memory.
LLM calls are tracked effects, not hidden side effects. The type system knows which functions touch AI. Budgets are linear resources.
Rust-style affine types without a borrow checker. Move semantics prevent data races at compile time.
OneForOne, AllForOne, RestForOne restart strategies. Agents are supervised processes with typed failure recovery.
Location-transparent PIDs. Same syntax for local and remote processes. Built-in node clustering with typed serialization.
Go-level readability with ML-level power. Pipe-forward, pattern matching, expression-oriented. No ceremony.
JAPL combines the best ideas from four language families into one coherent design.
Hindley-Milner inference, algebraic data types, pattern matching, effect tracking.
Affine types, move semantics, WASM compilation, Rust runtime.
Typed actors, message passing, supervision trees, fault tolerance.
Minimal syntax, fast compilation, single-binary deployment.
Rust compiler emits WASM bytecode, executed on a Rust runtime with wasmtime.
Tokenizes JAPL source into a typed token stream
Builds an abstract syntax tree with full span tracking
Hindley-Milner inference with effect and ownership analysis
Emits WASM bytecode for the Rust runtime