Mesh

Getting Started

This guide takes you through the public first-contact path: install Mesh, run hello-world, then choose the starter that matches what you want to evaluate next.

Installation

Use the documented installer scripts to install both meshc and meshpkg. The staged release proof covers these installer targets:

  • macOS x86_64 and arm64
  • Linux x86_64 and arm64 (GNU libc)
  • Windows x86_64

macOS and Linux:

bash
curl -sSf https://meshlang.dev/install.sh | sh

Windows x86_64 (PowerShell):

powershell
irm https://meshlang.dev/install.ps1 | iex

The installers place both binaries in ~/.mesh/bin on Unix-like systems and ~\.mesh\bin on Windows.

Verify the install

After installing, verify both binaries are available:

bash
meshc --version
meshpkg --version

You should see the Mesh version number printed for each command.

Alternative: Build from source

If you are contributing to Mesh or targeting an environment outside the public installer coverage, build from source instead. A source build requires:

  • a current Rust toolchain;
  • LLVM 21, with LLVM_SYS_211_PREFIX pointing to that installation when it is not discoverable automatically; and
  • clang plus the linker and system libraries for the target you are building.

Then install both commands:

bash
git clone https://github.com/hyperpush-org/mesh-lang.git
cd mesh-lang
export LLVM_SYS_211_PREFIX=/path/to/llvm-21
cargo install --path compiler/meshc
cargo install --path compiler/meshpkg

The repository's default LLVM path targets Apple Silicon Homebrew. Override it on Intel macOS, Linux, or Windows. Cross-compiling also needs a working target linker and sysroot; rustup target add alone does not provide those native tools.

Hello World

Create a new Mesh project:

bash
meshc init hello
cd hello

Open main.mpl and replace its contents with:

mesh
fn main() do
  println("Hello, World!")
end

Compile and run it:

bash
meshc build .
./output

You should see Hello, World! printed to the terminal.

When the project directory argument is ., the default executable name is output. Use meshc build . --output hello when you want a named binary.

main.mpl remains the default executable entrypoint. If you need a different startup file later, use the optional [package].entrypoint = "lib/start.mpl" setting in mesh.toml.

Choose your next starter

Once hello-world runs, pick the starter that matches your next job.

  • meshc init --clustered hello_cluster — the minimal clustered starter. It keeps the public clustered-app contract small: work.mpl declares @cluster, main.mpl boots through Node.start_from_env(), and runtime inspection stays on Mesh-owned meshc cluster status|continuity|diagnostics commands.
  • meshc init --template todo-api --db sqlite todo_api — the honest local-only starter. It is a single-node SQLite Todo API, keeps SQLite single-node only, includes actor-backed write rate limiting plus generated package tests, and makes no clustered placement or operator claims.
  • meshc init --template todo-api --db postgres shared_todo — the serious shared/deployable PostgreSQL starter. It keeps clustered work source-first, uses migrations plus a real DATABASE_URL, clusters shared reads and idempotent POST /todos, keeps local health plus unsafe-keyless PUT and DELETE local, and owns the staged deploy + failover proof chain once you step onto the proof pages.

What's Next?

Keep the public first-contact ladder explicit and ordered: clustered scaffold first, then the honest local SQLite starter, then the shared/deployable PostgreSQL starter, and finally the autonomous cluster and release-proof guides.

After that starter/examples-first ladder, continue with the language guides:

  • Language Basics -- variables, types, functions, pattern matching, control flow, and more
  • Type System -- structs, sum types, generics, and type inference
  • Concurrency -- actors, message passing, supervision, and services
Edit this page on GitHub
v14.0 Last updated: July 29, 2026