Mesh combines Elixir-style concurrency with static type inference, compiling to fast native binaries.
actor Counter do
def init(), do: 0
def handle_cast(:inc, state), do: state + 1
def handle_call(:get, _from, state) do
{:reply, state, state}
end
end
pub fn main() do
let counter = spawn(Counter)
cast(counter, :inc)
let router = HTTP.new()
|> HTTP.get("/", fn(_req) do
let count = call(counter, :get)
HTTP.json(200, %{"count": count})
end)
HTTP.serve(router, 8080)
endA language designed for building reliable, concurrent systems with minimal boilerplate.
Spawn millions of lightweight actors with crash isolation and supervision trees. Each actor has its own heap and message queue.
actor Counter do
def init() do
0
end
def handle_cast(:increment, state) do
state + 1
end
def handle_call(:get, _from, state) do
{:reply, state, state}
end
end
let pid = spawn(Counter)
cast(pid, :increment)
let count = call(pid, :get)First-class pattern matching with exhaustiveness checking. Destructure any value — structs, tuples, sum types, lists.
fn describe(value) do
match value do
0 -> "zero"
n when n > 0 -> "positive"
n when n < 0 -> "negative"
end
end
fn process(result) do
match result do
Ok(value) -> IO.puts("Got: ${value}")
Err(msg) -> IO.puts("Error: ${msg}")
end
endHindley-Milner type inference means you rarely write type annotations. The compiler catches errors at compile time.
# Types are inferred -- no annotations needed
let name = "Mesh"
let numbers = [1, 2, 3, 4, 5]
let doubled = numbers
|> List.map(fn(n) do n * 2 end)
|> List.filter(fn(n) do n > 4 end)
# Structs with inferred field types
struct User do
name :: String
age :: Int
end
let user = User { name: "Alice", age: 30 }Chain transformations naturally with the pipe operator. Data flows left to right, just like you read it.
let result = "hello world"
|> String.split(" ")
|> List.map(fn(word) do
String.upcase(word)
end)
|> String.join(", ")
# result == "HELLO, WORLD"Mesh sits at a unique intersection in the programming language landscape.
Mesh shares Elixir's actor model and let-it-crash philosophy, but adds static types with full inference. No runtime type errors, no dialyzer setup, and it compiles to native binaries instead of running on the BEAM.
Mesh provides Rust-level native performance without borrow checking complexity. Mesh uses per-actor garbage collection instead of ownership, making concurrent code dramatically simpler to write.
Like Go, Mesh compiles to fast native binaries with lightweight concurrency. But Mesh adds pattern matching, algebraic types, type inference, and supervision trees — making it more expressive and fault-tolerant.
Get started in seconds.
curl -sSf https://mesh-lang.org/install | sh