Mesh is a compiled language with typed actors and distribution in the programming model. Declare eligible work with @cluster; the runtime applies the routing, continuity, and capacity policy in your manifest.
# work.mpl
@cluster
pub fn add() -> Int do
1 + 1
end
# api/router.mpl
from Api.Todos import (
handle_get_todo,
handle_list_todos
)
pub fn build_router() do
HTTP.router()
|> HTTP.on_get("/todos",
HTTP.clustered(handle_list_todos))
|> HTTP.on_get("/todos/:id",
HTTP.clustered(handle_get_todo))
endIn a configured autonomous cluster, @cluster declares eligible work and the runtime owns execution placement, continuity, and pressure-aware routing. Public ingress, credentials, and provider configuration remain deployment responsibilities.
from Api.Health import handle_health
from Api.Todos import (
handle_create_todo,
handle_get_todo,
handle_list_todos
)
pub fn build_router() do
HTTP.router()
|> HTTP.on_get("/health", handle_health)
|> HTTP.on_get("/todos",
HTTP.clustered(handle_list_todos))
|> HTTP.on_get("/todos/:id",
HTTP.clustered(handle_get_todo))
|> HTTP.on_post("/todos", handle_create_todo)
endThis interactive panel illustrates topology and rerouting; it is not a live cluster or a zero-loss guarantee. Actual recovery depends on quorum, replicas, readiness, continuity policy, and stable operation identity. Click any node below to explore the sequence.
HTTP, WebSockets, database drivers, structured JSON, actors, jobs, binary values, and testing ship with the toolchain. Use packages for ecosystem-specific protocols and native libraries.
pub fn build_router() do
HTTP.router()
|> HTTP.on_get("/todos", handle_list_todos)
|> HTTP.on_get("/todos/:id", handle_get_todo)
|> HTTP.on_post("/todos", handle_create_todo)
endBounded runtime telemetry — Cluster.telemetry() exposes scheduler, mailbox, HTTP, dispatch, process, and resource counters; meshc cluster provides the operator and continuity views.
availableBenchmarked on dedicated Fly.io machines — 2 vCPU, 4 GB RAM, same region, private network. The comparison shown here is one minimal HTTP/1.1 endpoint, not a general application-performance claim.
bar = p50 · dot = p99
recorded before load
GET /text · Fly.io performance-2x · 100 connections · 30s warmup + 5×30s runs · run 1 excluded · full methodology →
Mesh 14 connects the type system, actor runtime, service libraries, native packages, and cluster operations. Each row links to the exact public contract.
| area | implemented surface | guide |
|---|---|---|
| Language | Inference, generics, algebraic types, interfaces, pattern matching, pipes, and Result propagation | read → |
| Concurrency | Typed actors, services, supervisors, jobs, timers, links, monitors, and bounded channels | read → |
| Service stack | HTTP and WebSocket servers and clients, structured JSON, SQLite, PostgreSQL, pools, ORM, and migrations | read → |
| Distribution | @cluster work, remote actors, continuity, adaptive routing, capacity drivers, and bounded telemetry | read → |
| Native ecosystem | Checksum-pinned ABI 1 archives plus official Borsh, Anchor validation, and Solana packages | read → |
| Toolchain | Native compiler, formatter, tests, REPL, migrations, package manager, LSP, editor support, and operator CLI | read → |
Use the command below on macOS or Linux. The getting-started guide includes the Windows PowerShell installer.
curl -sSf https://meshlang.dev/install.sh | sh