Quick Start Guide
This guide uses the v0.0.1 Warder CLI surface: new, init, add,
remove, build, run, test, publish, wrap, unwrap, and doctor.
Verify Tools
After installing or building from source, check that both binaries are on your
PATH:
restrict_lang --version
warder --version
When using a local workspace build, both binaries are under target/release.
Create A Project
warder new hello-world
cd hello-world
This creates:
hello-world/
├── warder.toml
├── src/
│ └── main.rl
├── tests/
│ └── main_test.rl
├── README.md
└── .gitignore
The generated src/main.rl uses current Restrict syntax:
fun main: () -> () = {
"Hello, World!" |> println
}
Check The Repository Configuration
The root warder.toml is the repository’s only authored Warder configuration.
It controls the entry point, dependency table, and build output:
[package]
name = "hello-world"
version = "0.1.0"
description = "A first Restrict package"
authors = ["Your Name <you@example.com>"]
entry = "src/main.rl"
edition = "2025"
[dependencies]
[build]
target = "wasm32"
optimize = true
output = "dist/"
Build And Run
warder build
warder run
warder test
The default build writes:
dist/hello-world-0.1.0.wat
dist/hello-world-0.1.0.wasm
dist/hello-world-0.1.0.rgc
warder run builds first, then runs the generated .wasm with Wasmtime or
Wasmer when one is installed. warder test compiles and executes public
zero-argument Boolean functions under tests/; v0.0.1 does not add a separate
test declaration syntax.
Add A Small Pipeline
Replace src/main.rl with:
fun add_bonus: (base: Int32, bonus: Int32) -> Int32 = {
base + bonus
}
fun main: () -> () = {
val total = (21, 4) add_bonus;
total |> print_int
}
Run it:
warder run
Host networking and file or stream I/O are outside the v0.0.1 quick-start
runnable path. Keep quick-start programs limited to the compiler-registered
surface such as println and print_int.
Dependencies
warder add local_utils --path ../local-utils
warder remove local_utils
The dependency directory needs only src/lib.rl; it has no leaf Warder
configuration or lock. The alias local_utils is also its source namespace,
so an exported score function from the library root is imported with:
import local_utils.{score}
Submodules follow the same mapping: import local_utils.numbers.{double} loads
../local-utils/src/numbers.rl. Aliases must be non-keyword Restrict
identifiers, std is reserved, and hyphens are not converted automatically.
warder build generates one repository-root warder.lock. It records only
nondeterministic external dependency resolutions, not direct local source
packages. Registry, Git, foreign WASM, and transitive resolution fail
explicitly in the current slice, so a local-only lock has no resolved package
entries. warder test uses the same local package roots.
The current implementation has one publishable root package. A future
multi-publish workspace graph will extend the same root warder.toml without
leaf manifests; public package identity will not be inferred from directory
placement.
Builds compile immutable application and dependency snapshots. Concurrent builds of one project are serialized, and the generated WAT, WASM, Cage, and lock file replace the previous set only after the full build succeeds.
Local Cage Files
warder build creates a local cage file at
dist/<name>-<version>.rgc; there is no separate packaging subcommand.
For external WASM files:
warder wrap module.wasm --name module-name --version 0.1.0
warder unwrap module-name-0.1.0.rgc
Foreign WASM wrapping is experimental in v0.0.1 and is intended for local evaluation.
Diagnostics
warder doctor
warder doctor checks the root configuration, entry source path, root lock
integrity when present, required compiler, and available WASM runtime.
Next Steps
- Read the Language Guide
- Learn more about Warder
- Explore the Standard Library