Skip to content
Axiom/SDK
SDK / Overview

Overview

The SDK is everything you need to write a mod or a pack for Axiom. A mod is a small WebAssembly module that calls the surface, a fixed set of capabilities that every backend answers the same way. A pack is a pack.toml that tells Axiom where one game keeps its world. This section covers both, call by call, and says plainly where something is designed but not built yet.

There is no public release yet

Until the first release, the CLI, the launcher and the Sandbox come from a build of the Axiom source. These pages describe what that build does today.

What a mod is

A mod is a directory with two files in it:

File
What it is
axiom.toml
The manifest: the mod's id, version and tier, the game it is for, every capability it uses, and its settings.
mod.wasm
The binary, compiled from C, C++ or Rust against the surface. It exports on_frame, and optionally on_event, and imports only the calls it makes.

Anything else in the directory, such as a texture or a readme, is packaged with it. A whole mod can be this small:

OBSERVER.Ca complete mod
#include "surface.h"

static uint32_t s_Seen = 0;
static uint64_t s_Frame = 0;

__attribute__((export_name("on_frame"))) void OnFrame(void) {
  s_Seen = axiom_entity_query_count();
  s_Frame = axiom_frame_index();
}

The host calls on_frame once a frame. Everything the mod knows about the game comes back through the calls it imports, and everything it does to the game goes out through them. There is no other way in or out: no file system, no network, no pointer into the game.

Mods, packs and providers

Axiom has three kinds of package, and each answers a different question. A provider knows how to reach one family of runtimes. A pack knows where one game keeps its world. A mod is what a person installs to change the game, and it reaches the game only through the other two.

What
Mod
Pack
Provider
Answers
What to do in the game
Where one game keeps its world
How to reach one runtime family
Written by
Anyone
Anyone who knows the game
The Axiom project, for now
Written in
C, C++ or Rust, compiled to WebAssembly
pack.toml: names and offsets, no code
C++, inside Axiom
Manifest
axiom.toml
pack.toml
None yet
For
One game, and its builds
One game, and its builds
Every game on that runtime, such as Unity on Mono
Runs as
A sandboxed module, metered by fuel
Data the provider reads with, never run
Axiom's own code
Touches the game
Only through capabilities it declared
Never: it names what the provider reads
Reads and writes memory, behind the gate
How many per game
Any number, in load order
One answers at a time
One per session
Uses the surface
Calls it
Answers part of it: entities, transform, camera
Answers the rest: frame, overlay, config, input
Depends on
Other mods
Nothing
Nothing
Installed with
axiom install
axiom pack install
Ships with Axiom
Signed and published
Yes, up to 64 MiB
Yes, up to 64 MiB
The registry takes them, up to 256 MiB; installing one is not built

A mod cannot tell which of the other two answered a call: it asks entity.query@1 and gets an answer. That is what lets one unchanged mod binary run on any game whose pack answers what it needs. Writing a pack and the provider seam say more about each.

How a mod gets to a game

  1. Write the mod in C, C++ or Rust, and build it to mod.wasm.
  2. Declare what it uses in axiom.toml. The host refuses a binary that imports anything the manifest did not name.
  3. Check and build: axiom check reads the manifest, and axiom build packages the directory as an .axpkg.
  4. Sign and publish it to the registry with your key. A mod runs only signed.
  5. Install it with axiom install, which checks the signature and asks before it installs.
  6. Run it: the Sandbox for a mod that draws, axiom attach for a game.

Your first mod walks that path end to end in the Sandbox, which needs no game.

What each backend serves

A backend serves one runtime family, and a pack answers game questions on top of it. Before a mod starts, the host checks every capability it requires against what is served here, and a mod that needs something missing is refused before it runs a line. Within a served capability, a mod should import only the calls listed: an import the backend does not answer stops the mod loading, with the call named.

Backend
Serves today
Says Unsupported
Axiom Sandbox (axiom.sandbox)
frame@1, ui.overlay@1, config@1
input.observe@1
Headless
frame@1, plus what its pack answers
ui.overlay@1, input.observe@1
Unity on Mono, with the Cities: Skylines pack
frame@1, entity.query@1, entity.transform@1
ui.overlay@1, camera@1, input.observe@1
Capability
Calls answered today
frame@1
index, delta, staleness_ms
entity.query@1
count, alive, is_alive
entity.transform@1
position, transform, writable, set_position
camera@1
view, projection, view_projection, position, from a pack with a fixed camera
project@1
world_to_screen, from a pack with a fixed camera
ui.overlay@1
every call, in the Sandbox
config@1
number, flag, text, in the Sandbox

entity.query@1's by_kind and within, the bulk transforms and positions, and camera@1's fov and clip are in the surface and not answered by any pack yet. input.observe@1, hook@1, fs@1, fs.any@1, assets.redirect@1 and net@1 are defined in the surface and no backend serves them yet. They are in the capability reference so you can see where the surface is going; do not build a mod on them yet.

The headless backend runs mods on a tick of its own, at 20 a second, with no game drawing. No game is on its vouched list yet, so the shipped axiom attach refuses every headless target at the gate, and today it runs in tests. The Unity backend reads a vouched game's memory from outside, without loading anything into the game, and is what runs the vehicle mods on Cities: Skylines.

Where to go next

Page
Read it for
The guest ABI
surface.h, building, how each value crosses, and what the host checks first.
Languages
Writing a mod in C, C++ or Rust, and what a pack is written in.
The manifest and lifecycle
Every key in axiom.toml, dependencies, version ranges, phases and settings.
Frames and fuel
on_frame, the frame's timing, and the budget a mod runs in.
Events
on_event, reading a payload, and which events arrive today.
Handles and statuses
Why a handle lasts one frame, and what every status code means.
Entities and the camera
Listing, reading and moving things in a game, and projecting them to the screen.
The overlay and config
Panels, tables, controls bound to settings, buttons and graphs.
Permissions
What is asked at install, what is asked at run time, and what is never remembered.
Writing a pack
pack.toml, verifying it against a game, and publishing it.
Signing and publishing
Keys, logging in, publishing, hiding, yanking and what an install checks.