LogoMist

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:

Terminal
cargo install mist-lang@0.3.1-alpha.0

Once the installation finishes, verify it by checking the version:

Terminal
mist version

2. Setting Up Your Project

Mist works alongside Cargo to handle the heavy lifting. Use init to scaffold a new project:

Terminal
cargo new my-mist-app
cd my-mist-app
mist init

This 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:

mist.json
{
  "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:

src/main.mist
fn main() {
    println!("Hello World!");
}

Build and Run

Terminal
mist run          # or the short alias: mist r
mist build        # or: mist b
mist check        # or: mist c
mist transpile    # or: mist t

Command Reference

CommandAliasDescription
mist initInitializes a new Mist project
mist runrRuns the project in the current directory
mist buildbBuilds the project in the current directory
mist transpiletTranspiles the project in the current directory
mist checkcChecks the project in the current directory
mist version-vPrints the compiler version
mist help-hPrints this message

On this page