Quick Start

Write and run your first Tensor program in 5 minutes.

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.

<asset>.sha256

Checksum verified

SHA-256 checked against the published sidecar before install.

GitHub Releases

No Rust toolchain required

A pre-built binary; nothing is compiled locally.

install.ps1

Windows

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:

  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 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
      }
    }

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 IRMLIRLLVM

MLIR path

Downstream interchange: specialty targets and inspection.

canonical IRELF · Mach-O · PE

Native path

Normative self-host path, written in pure MIND. No MLIR or LLVM in the loop.