Quick Start
Write and run your first Tensor program in 5 minutes.
Quick Install (Recommended)
One command to install MIND with all dependencies:
curl -sSL https://mindlang.dev/install.sh | sh
Downloads the pre-built mindc binary for your platform from GitHub Releases, verifies its SHA-256 against the published sidecar, and installs it on your PATH. No Rust toolchain required, nothing is compiled locally. Set MIND_INSTALL_DIR to choose the target directory, MIND_VERSION to pin a release, or MIND_DRY_RUN=1 to print what would happen without writing. Windows: use install.ps1.
Manual Installation
Alternatively, build from source manually:
1. Clone & build the compiler
Use the public compiler repo and build the CLI from source:
git clone https://github.com/star-ga/mind.git cd mind cargo build --release --bin mindc
2. Inspect the sample program
The repository ships with examples/hello_tensor.mind, a minimal scalar smoke that parses and executes on the v0.10.x compiler line. Emit the typed SSA IR directly from the CLI:
cargo run --bin mindc -- examples/hello_tensor.mind --emit-ir
Expected output: a small module { ... } block ending with next_id = 1. This is the canonical mic@1 textual serialisation of the IRModule data shape; the same shape also serialises to canonical mic@3 binary (RFC 0021), with both forms round-trip equivalent and shareable across substrates.
3. Try the gradient IR
Autodiff is feature-gated; pass --features autodiff to cargo:
cargo run --features autodiff --bin mindc -- examples/hello_tensor.mind --func main --autodiff --emit-grad-ir
Autodiff currently runs on main; use --func main. Pure-MIND standard-library demos (std.vec, std.string, std.map, std.io) require the cross-module-imports feature; std-surface is the shipped default in mindc v0.10.x and requires no opt-in flag.
4. MLIR lowering
MLIR emission is feature-gated behind mlir-lowering. Scalar float math lowers on the strict deterministic path — arith.mulf / arith.addf with no fmuladd contraction and no fast-math flag, in fixed source order:
cargo run --features mlir-lowering --bin mindc -- examples/hello_tensor.mind --func main --emit-mlir
module {
func.func @main() -> f64 {
%0 = arith.constant 3.0 : f64
%1 = arith.mulf %0, %0 : f64
%2 = arith.constant 2.0 : f64
%3 = arith.mulf %2, %0 : f64
%4 = arith.addf %1, %3 : f64
%5 = arith.constant 1.0 : f64
%6 = arith.addf %4, %5 : f64
return %6 : f64
}
}MLIR is the downstream-interchangebackend, used for specialty targets and for inspection. The normative self-host path is the pure-MIND native-ELF backend, which emits x86-64 ELF directly from the canonical IR with no MLIR or LLVM in the loop — see MLIR Lowering and the IR page.