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 | shDownloads 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.
<asset>.sha256Checksum verified
SHA-256 checked against the published sidecar before install.
GitHub ReleasesNo Rust toolchain required
A pre-built binary; nothing is compiled locally.
install.ps1Windows
Use install.ps1.
MIND_INSTALL_DIRSet to choose the target directory.MIND_VERSIONSet to pin a release.MIND_DRY_RUN=1Print what would happen without writing.
Manual Installation
Alternatively, build from source manually:
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 mindcInspect the sample program
The repository ships with
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-irExpected output: a small
module { ... }block ending withnext_id = 1. This is the canonicalmic@1textual serialisation of theIRModuledata shape; the same shape also serialises to canonicalmic@3binary (RFC 0021), with both forms round-trip equivalent and shareable across substrates.Try the gradient IR
Autodiff is feature-gated; pass
--features autodiffto cargo:cargo run --features autodiff --bin mindc -- examples/hello_tensor.mind --func main --autodiff --emit-grad-irAutodiff currently runs on
main; use--func main. Pure-MIND standard-library demos (std.vec, std.string, std.map, std.io) require thecross-module-importsfeature;std-surfaceis the shipped default inmindcv0.10.x and requires no opt-in flag.MLIR lowering
MLIR emission is feature-gated behind
mlir-lowering. Scalar float math lowers on the strict deterministic path:arith.mulf/arith.addfwith nofmuladdcontraction and no fast-math flag, in fixed source order:cargo run --features mlir-lowering --bin mindc -- examples/hello_tensor.mind --func main --emit-mlirmodule { 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 } }
Two backends from one IR
MLIR is the downstream-interchange backend, used for specialty targets and for inspection, and it is the default mindc build backend today (--backend mlir). The normative self-host path is the pure-MIND native backend (opt-in, --backend native), which emits ELF, Mach-O and PE/COFF binaries for x86-64 and ARM64 directly from the canonical IR with no MLIR or LLVM in the loop. See MLIR Lowering and the IR page.
canonical IRMLIRLLVMMLIR path
Downstream interchange: specialty targets and inspection.
canonical IRELF · Mach-O · PENative path
Normative self-host path, written in pure MIND. No MLIR or LLVM in the loop.