CLI
Use raven --help for the built-in reference. The commands:
raven
On its own, launches a REPL:
$ raven
> 2+2
4
raven <source> [args...]
Runs a file – either a .rv source file (compiled and executed in one step) or a previously built .wasm binary. Trailing arguments are passed to the program (see args()).
| Option | Effect |
|---|---|
--package <name=entry.rv> | Register a package by name and entry point (repeatable) |
--no-inline | Disable function inlining |
--no-memcheck | Disable allocation checks |
--strip | Remove debug metadata from the binary |
raven build <source>
Compiles without running:
$ raven build hello.rv # -> hello.wasm
$ raven build hello.rv -o out.wasm # name the output
$ raven build --js hello.rv # -> hello.js + hello.wasm
$ raven build --js --embed hello.rv # single-file JS
| Option | Effect |
|---|---|
--js | Emit a JS wrapper |
--embed | Embed the wasm into the emitted JS |
--esbuild | esbuild-compatible wasm imports |
-o, --output <file> | Rename the output file |
--time | Print compiler phase timings |
--time output looks like:
Load 113.76ms
Definitions 89.35ms
Interpret 119.46ms
Inference 496.77ms
Expansion 228.47ms
Inlining 1.04s
Refcounts 257.79ms
WASM 158.22ms
Total 2.38s
raven fmt [files...]
Formats source files in place, defaulting to the current directory:
$ raven fmt hello.rv
| Option | Effect |
|---|---|
--check | List files that would be reformatted |
--diff | Print the changes that would be made |
Both exit non-zero if anything would change, for use in CI.
raven lsp
Starts the language server, used by editor tooling for diagnostics and formatting.
raven version
Prints the version.