Mesh is a compiled, statically typed language with actors built in and clustering in the runtime. Mark the work that can run anywhere; Mesh handles placement, routing, and failover.
curl -sSf https://meshlang.dev/install.sh | shpub fn hello(request :: Request) -> Response do
case Request.param(request, "name") do
Some(name) -> HTTP.response(200, json { hello: name })
None -> HTTP.response(400, "missing name")
end
end
fn main() do
let router = HTTP.router()
# the runtime decides which node runs it
|> HTTP.on_get("/hello/:name", HTTP.clustered(hello))
case Node.start_from_env() do
Ok(_) -> HTTP.serve(router, 8080)
Err(reason) -> println("boot failed: #{reason}")
end
endDistribution
Handlers declare what may run on the cluster. The runtime owns placement, routing, and continuity, so a lost node is its problem, not your code's.
Illustrative. Real recovery depends on quorum, replicas, and your continuity policy.
Standard library
HTTP, WebSockets, Postgres, SQLite, JSON, jobs, and a test runner ship with the toolchain. No framework to pick first.
Browse the standard library →actor counter(total :: Int) do
receive do
amount -> counter(total + amount)
end
end
fn main() do
let pid = spawn(counter, 0) # Pid<Int>
send(pid, 5)
send(pid, "five") # compile error: expected Int, found String
endPerformance
One minimal HTTP endpoint on dedicated 2 vCPU machines, 100 connections. A benchmark, not a promise about your app.
Read the methodology →| Language | requests / s | p50 | p99 |
|---|---|---|---|
| Rust | 46.2k | 2.06 | 4.55 |
| Go | 30.3k | 2.95 | 8.51 |
| Mesh | 29.1k | 2.77 | 16.94 |
| Elixir | 12.4k | 6.74 | 25.14 |
One script installs the meshc compiler and the meshpkg package manager.
curl -sSf https://meshlang.dev/install.sh | shirm https://meshlang.dev/install.ps1 | iex