Get Started
This guide will walk you through installing the Mist CLI, setting up your development environment, and compiling your very first program.
1. Installation
Mist is currently distributed as a Cargo crate. To get started, you'll need to have the Rust toolchain installed.
Run the following command to install the Mist compiler:
cargo install mist-lang@0.3.1-alpha.0Once the installation finishes, verify it by checking the version:
mist version2. Setting Up Your Project
Mist works alongside Cargo to handle the heavy lifting. Use init to scaffold a new project:
cargo new my-mist-app
cd my-mist-app
mist initThis creates a src/main.mist and wires up the output directory (.mist/src/) in your Cargo.toml.
Manual Setup
If you prefer to configure things yourself, create a mist.json file:
{
"src": "src",
"output": "build"
}Source files go in src/ and the transpiled output goes to .mist/src/. Non-Mist files in src/ (e.g. Rust sidecar files) are copied through as-is.
3. Your First Program
Create a new file at src/main.mist and add the following code:
fn main() {
println!("Hello World!");
}Build and Run
mist run # or the short alias: mist r
mist build # or: mist b
mist check # or: mist c
mist transpile # or: mist tCommand Reference
| Command | Alias | Description |
|---|---|---|
mist init | Initializes a new Mist project | |
mist run | r | Runs the project in the current directory |
mist build | b | Builds the project in the current directory |
mist transpile | t | Transpiles the project in the current directory |
mist check | c | Checks the project in the current directory |
mist version | -v | Prints the compiler version |
mist help | -h | Prints this message |