Conjure is a systems-level programming language designed for games and real-time applications, built with a tooling-first philosophy.

It is currently in the early to mid stages of development, with the compiler and language features rapidly evolving and is not yet available for public use. This site is designed to help with specification and documentation as the language is being built and to provide information to internal early adopters and contributors.

import "std/io"

enum Shape {
	Circle f32
	Rect { w f32, h f32 }
}

func area(s Shape) f32 {
	return when s {
		.Circle(r): 3.14159 * r * r
		.Rect(d): d.w * d.h
		else: 0.0
	}
}

func main() {
	var shapes = []Shape{
		Shape.Circle(5.0),
		Shape.Rect({ w = 10.0, h = 3.0 }),
	}
	for s in shapes {
		io.println("area = #{area(s)}")
	}
}

A simple, modern syntax that feels comfortable to anyone who has used Go, Swift, or Zig. Pattern matching with when, string interpolation with #{}, data enums with associated values, and type inference that stays out of your way.

Conjure ships with 2 standard libraries. The core library is always available and provides essential functionality for working with the language. The second, MAGE, is an optional library that provides additional functionality specific to game development. Use any parts of it you like as a foundation for your own game engine or game.

import "mage"

func main() {
	mage.init()
	defer mage.shutdown()

	var window = mage.window.new("My Game", 800, 600)
	defer window.free()

	while window.isOpen() {
		window.pollEvents()
		window.clear(0.1, 0.1, 0.1, 1.0)
		mage.routines.yield()
		mage.world.update()
		window.swapBuffers()
	}
}
extern import "framework:Cocoa" if OS == .Darwin
extern import "lib:GL" if OS == .Linux

extern "SDL_Init" func sdlInit(flags u32) i32
extern "SDL_CreateWindow" func sdlCreateWindow(
	title *u8, x i32, y i32, w i32, h i32, flags u32
) rawptr

func main() {
	sdlInit(0x20)
	var win = sdlCreateWindow(
		"Conjure", 0, 0, 800, 600, 0x02
	)
}

Call C functions directly with no wrappers, no bindings generators, and no runtime overhead. Declare extern functions with Conjure types, and the compiler handles the ABI. Platform-specific dependencies are declared inline with extern import and conditional guards. No separate build files needed.

# Desktop
conjure build src/main.cjr

# Retro consoles
conjure build src/main.cjr --target=mipsel-sony-psx
conjure build src/main.cjr --target=thumbv4t-none-eabi

# WebAssembly
conjure build src/main.cjr --target=wasm32-wasi

# Embedded
conjure build src/main.cjr --target=avr-unknown-unknown

One compiler, any target. Pass an LLVM target triple and Conjure handles the rest: no separate toolchain installs, no platform SDKs to wrangle. Ship to desktop, web, retro consoles, and embedded devices from the same codebase with conditional extern import guards for platform-specific code.

# Create a new project
conjure init my-game

# Add a dependency
conjure add github.com/user/physics@v2.0 physics

# Build, test, run
conjure build
conjure test
conjure run

# Editor support out of the box
# LSP: hover, go-to-definition, completions,
#       find references, rename, diagnostics

Everything ships in a single binary. Project scaffolding, dependency management, compilation, testing, formatting, and a full-featured LSP. No plugins to install, no config files to write. The conjure command is the only tool you need.