Start
Install
Download one binary. Every subcommand is inside it, and there is no runtime to install beside it.
Download
curl -fLO https://github.com/grasm-lang/grasm/releases/latest/download/grasm-aarch64-apple-darwin
chmod +x grasm-aarch64-apple-darwin && mv grasm-aarch64-apple-darwin grasm
./grasm run hello.grApple silicon. On an Intel Mac take grasm-x86_64-apple-darwin
instead. Every
download and its checksum →
Or build it
A Rust toolchain bootstraps the compiler, the way every language starts —
and none of it survives into what you ship.
All four crates a compiled Grasm program links are no_std: the
runtime reaches the operating system through grasm_sys, over raw
syscalls and libc, never over Rust's standard library. A hello-world is
85.7 KB and nm finds nothing of Rust's in it.
How that was done →
From source
git clone https://github.com/grasm-lang/grasm.git
cd grasm
cargo build --release --workspace
./target/release/grasm run examples/hello.gr
The binary is target/release/grasm. Put it on your path, or call
it where it is.
What you get
| Command | Does |
|---|---|
grasm run FILE | Runs it under the interpreter. |
grasm build FILE -o OUT | Writes a bundle — one file, runs anywhere. |
grasm build FILE --native -o OUT | Compiles ahead of time through Cranelift. |
grasm build FILE --native --target TRIPLE | Cross-compiles; link against the runtime for that target. |
grasm test [DIR] | Runs test blocks. |
grasm bench [DIR] | Runs bench blocks. |
grasm check FILE | Types and effects only, no output. |
grasm fmt [DIR] | Formats. |
grasm deps [DIR] | Resolves dependencies, checks capability ceilings, writes grasm.lock. |
grasm journal FILE | Reads a recording of a program's effects. |
Editor support
A language server is in crates/grasm_lsp and a VS Code extension
in editors/vscode. A debug adapter is in
crates/grasm_dap.