A minimal language for
building native software

Compiles directly to native executables for Windows, Linux, macOS, iOS, Android, and WebAssembly. No assembler, no linker, no runtime.

// hello.mc
i32 main() {
    print("Hello, world!\n");
    return 0;
}
source.mc
minc
Windows x64
Linux x64
Linux arm64
macOS
iOS
Android
WASM

A single executable that cross-compiles to all targets from any platform.
Generated code is competitive with MSVC, gcc and clang O2 optimizations.

Modern syntax, minimal core

Familiar C-like syntax with modern conveniences — type inference, struct literals, defer, slices, named arguments, and tagged unions. Practical, not comprehensive. Enough to get things done without the overhead.

struct Rect { i32 x, y, w, h; }

bool contains(Rect r, i32 px, i32 py) {
    return px >= r.x && px < r.x + r.w &&
           py >= r.y && py < r.y + r.h;
}

i32 main() {
    var box = Rect{ x: 0, y: 0, w: 64, h: 48 };
    print("hit = {}\n", contains(box, px: 10, py: 20));
    return 0;
}

True native cross-compilation

A single executable generates Windows, Linux, macOS, iOS, Android and WASM binaries directly — no external assembler or linker needed. Cross-compile from any platform to any target.

// Cross-compile from any platform:

$ minc app.mc --target win-x64     // Windows PE
$ minc app.mc --target linux-x64   // Linux ELF
$ minc app.mc --target macos-arm64 // macOS Mach-O
$ minc app.mc --target wasm        // WebAssembly

// Same source, same compiler, any target.
// No toolchain setup, no sysroot,
// no platform SDK required.

Fits on a floppy disk

The entire compiler self-compiles to fit on a double-sided 3½" floppy disk. Small enough to understand, fast enough to never wait for. Compile times are instant for small to medium-sized projects.

// Cross-compiler + all targets: ~1410 KB
// Fits on a 3½" floppy (1,440 KB)

$ minc run hello.mc
Hello, world!

Just enough ergonomics

Generics, tagged unions with exhaustive pattern matching, type aliases, auto-deref, type inference, function overloading, named arguments, destructuring, range-based for-loops, compile-time format strings, and a module system. Enough modern conveniences to stay productive without the complexity.

union Result<T, E> { Ok(T), Err(E) }    // tagged union

var p = Point{3, 4};        // type inference
var (x, y) = get_pos();     // destructuring
node.next.value;            // auto-deref (no -> needed)

draw(width: 800, height: 600);      // named arguments
for i in 0..n { sum += data[i]; }   // range-based for
print("{} + {} = {}\n", a, b, a+b); // compile-time

T max<T: Numeric>(T a, T b) {     // constrained generic
    return a > b ? a : b;
}

Built-in vector types with auto-SIMD

Vector and matrix types — float4, float4x4, f64x2 — are first-class types, not library wrappers. Arithmetic on them lowers to native SIMD instructions (SSE/NEON/WASM-SIMD) on every supported target.

// Built-in vector and matrix types
float4   pos    = float4{x, y, z, 1.0};
float4x4 mvp    = proj * view * model;

// Arithmetic lowers to SIMD (SSE/NEON/WASM-SIMD)
float4 clip     = mvp * pos;
float4 lit      = color * light + ambient;
f32    d        = dot(a, b);
float4 n        = normalize(v);

// Same types used in shaders (@shader) and CPU code.

Built-in shader compiler

Write shaders in minc syntax with @shader annotations. The compiler translates them to GLSL, HLSL, or Metal depending on the target platform. No separate shader toolchain or offline compilation step.

struct VsOut { float4 pos; float4 color; }

@shader vertex
VsOut cube_vs(
    @attr(0) float4 position,
    @attr(1) float4 color,
    @uniform float4x4 mvp
) {
    VsOut o;
    o.pos = mul(mvp, position);
    o.color = color;
    return o;
}

@shader fragment
float4 cube_fs(VsOut input) {
    return input.color;
}

Safe and predictable

No arithmetic or indexing undefined behavior. Bounds-checked arrays, wrapping arithmetic, mixed signed/unsigned rejected at compile time, and explicit casts for lossy conversions. Defer for deterministic cleanup. Compile-time format strings that can't crash at runtime. Built-in atomics, threads and cooperative fibers.

// Defer: deterministic LIFO cleanup
var fd = open("data.bin", 0);
defer close(fd);
var buf = alloc<u8>(4096);
defer free(buf);
// both freed in reverse order at scope exit

// signed overflow wraps, no UB
i32 x = 0x7FFFFFFF + 1;

// Cooperative fibers
void producer(void* arg) {
    print("step 1\n");
    fiber_yield();
    print("step 2\n");
}

// Threads: built-in, no external library
var t = thread_create(worker, arg);
thread_join(t);

Seamless C interop

Call C functions directly with extern declarations — no import libraries and no .def files, even for the Windows API. Link COFF, ELF, and Mach-O objects directly, or let a library bundle its own C shim. minc functions can be passed back to C as callbacks too — the C ABI is applied automatically.

// Call C directly: no import libs, no .def files.
when os(windows) {
    extern "user32.dll" i32 MessageBoxW(void* hwnd,
        u16* text, u16* title, u32 flags);
}
when os(linux) {
    // block form: one lib, many fns
    extern "libm.so.6" { 
        f64 sin(f64 x);
        f64 cos(f64 x); 
    }
}

// A library can carry its own C shim — the @link tag
// follows the #include, so `minc app.mc` just works:
//   lib/audio.mc:  @link "audio_shim.obj"
#include "lib/audio.mc"

// minc functions flow back into C as callbacks
// (the C ABI is applied automatically):
extern void set_log_handler(fn(u8*): void cb);
void on_log(u8* msg) { /* ... */ }
set_log_handler(on_log);

Developer tools included

VS Code extension with syntax highlighting and integrated debugging. Backed by a full language server (LSP) for go-to-definition, hover info, and live diagnostics.

// VS Code extension: syntax highlighting,
// integrated debugging with breakpoints.

// Full language server (LSP): go-to-definition,
// hover info, find references, diagnostics.

// Hover clamp:
// i32 clamp(i32 x, i32 lo, i32 hi)
i32 clamp(i32 x, i32 lo, i32 hi) {
    if (x < lo) return lo;
    if (x > hi) return hi;
    return x;
}

See it in action

Compiled from minc to WebAssembly — in your browser.

Pricing

Simple, fair pricing based on company size. No enforcement — honor system.

Free

€0
  • Revenue under €100k
  • Personal & education use
  • 30-day evaluation for everyone
  • Full compiler, all targets
Download

No DRM, no license keys, no phone-home. If your company makes over €100k/year and uses minc commercially, please buy a license.