Skip to content
@miri-lang

Miri Programming Language

Miri is a statically typed, natively compiled programming language with first-class GPU programming: mark data gpu, launch with forall, no CUDA toolchain.

Miri: GPU-first programming language

Miri is a statically typed, natively compiled programming language with first-class GPU programming: mark data gpu, launch with forall, no CUDA toolchain.

GPU code is written in the same language as the host code that calls it. You mark data gpu to make it device-resident and launch a kernel with forall; the compiler infers every upload, launch and readback, and shows them at the binding site. Kernels compile to WGSL and run on Metal, Vulkan, DX12 and WebGPU. Host code compiles to native machine code through Cranelift. There are no shader files, no FFI layer, and no separate host/device build.

gpu let a = [1.0, 2.0, 3.0, 4.0]
gpu let b = [5.0, 6.0, 7.0, 8.0]
gpu var dst = [0.0, 0.0, 0.0, 0.0]

forall i in 0..a.length()
    dst[i] = a[i] + b[i]

let host = dst   // the only boundary crossing: assignment = readback
println(f"{host[0]} {host[1]} {host[2]} {host[3]}")   // 6.0 8.0 10.0 12.0

▶ Run eight GPU demos live in your browser → — a gravitationally-lensed black hole, a traversable wormhole, a 147k-particle flow field, a fluid solver, and a neural net training on the GPU. Each one is a real Miri program compiled to WebGPU; the page runs the compiler's own output.

Repositories

Repository What it is
miri The language and compiler — frontend, type checker, MIR, Cranelift and WGSL backends, standard library.
miri-lang.org The website: documentation, the language and GPU guides, and the live demos.
vsc-extension Visual Studio Code extension — syntax highlighting and editor support.

Start here

Miri is a standalone language and compiler with its own syntax, type system and toolchain. It is in beta and not production ready — the current release is v0.5.0-beta.3, there are no prebuilt binaries yet, so you build it from source, and each release records what changed. Apache-2.0.

Popular repositories Loading

  1. miri miri Public

    Miri: GPU-first programming language

    Rust 10

  2. vsc-extension vsc-extension Public

    Visual Studio Code extension for Miri: GPU-first programming language

    1

  3. miri-lang.org miri-lang.org Public

    miri-lang.org — website, docs and live GPU demos for Miri: GPU-first programming language

    HTML 1

  4. .github .github Public

    Organization profile for miri-lang — the README rendered on github.com/miri-lang

Repositories

Showing 4 of 4 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…