Grasm v1.0.0 Get started

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.gr
One binary, eighteen subcommands, nothing beside it.

Apple 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

CommandDoes
grasm run FILERuns it under the interpreter.
grasm build FILE -o OUTWrites a bundle — one file, runs anywhere.
grasm build FILE --native -o OUTCompiles ahead of time through Cranelift.
grasm build FILE --native --target TRIPLECross-compiles; link against the runtime for that target.
grasm test [DIR]Runs test blocks.
grasm bench [DIR]Runs bench blocks.
grasm check FILETypes and effects only, no output.
grasm fmt [DIR]Formats.
grasm deps [DIR]Resolves dependencies, checks capability ceilings, writes grasm.lock.
grasm journal FILEReads 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.

No release binaries yet. Building from source is the only route today. That is on the roadmap.