Installation
Stav comes in two pieces. The stav command formats, checks and evaluates programs. The stav crate is the whole language as a Rust library, for programs that embed it.
The stav command
The command is published on crates.io as stav-cli. Install it with cargo:
cargo install stav-cliBuilding it needs Rust 1.89 or newer. If your toolchain is older, update it with rustup update stable first.
Check that the command is on your PATH:
stav --versionstav 0.1.0From a checkout
To build the latest development version, clone the repository and install the command from it:
git clone https://github.com/QaidVoid/stav
cd stav
cargo install --path crates/stav-cliThe library
To embed Stav in a Rust program, add the stav crate. Add serde with its derive feature as well if you want to read values into your own types:
cargo add stav
cargo add serde --features deriveThe library performs no I/O of its own and has a small dependency tree. Embedding in Rust shows how to use it.
Editor setup
Stav source files use the .stav extension, UTF-8 encoding and LF line endings. Indent with spaces. stav fmt lays files out in their canonical form, so it is worth running on save or before every commit:
stav fmt .With a directory, stav fmt formats every .stav file below it. The stav command describes every option.