Skip to content

Developers

From zero to in game.

Unzip the three downloads into one folder, pack an example to see the whole loop work, then seer new your own mod. seer check finds what the game would refuse, seer pack writes the .seerm, and seer dev runs the game with your mod and reloads it on save.

Pick a runtime

Every mod uses the same API: the events, host functions, registries and permissions in seer_api/api.ron (see the API reference). The runtime only decides how your code reaches it.

RuntimeYou writeThe package carriesSandboxed
native (Rust)the seer crate: #[seer::mod_main], #[seer::event], ModInit.dll / .so / .dylib per platformno
native (C)seer.h: seer_mod_entry + the SeerHostApi table.dll / .so / .dylib per platformno
luaLuau: the seer global, seer.on(..)main.lua / main.luauyes
wasma core wasm module importing "seer" (seer_guest.rs for Rust)mod.wasmyes

Lua and WASM mods run in plugins that ship next to the game (seer_script_lua.dll, seer_script_wasm.dll) and are loaded only when a mod needs them. They are held to their permissions and cannot listen to events that fire off the render thread. Native mods can use everything, and are not sandboxed.

1. Install the tools

Install only what your runtime needs. A Lua mod needs Python and an editor, nothing else.

Python 3.11 or newer Every runtime

The seer CLI is a Python script with no packages to install. Tick "Add python.exe to PATH" and keep the py launcher.

Rust via rustup (stable) Native Rust and WASM

Any recent stable toolchain: mods talk to the game through a C ABI, so the compiler version does not have to match the game. On Windows use the MSVC host (x86_64-pc-windows-msvc). WASM mods also need the wasm32-unknown-unknown target.

Visual Studio 2022 Build Tools Native Rust on Windows

Workload "Desktop development with C++": the MSVC linker rustc uses for a .dll.

Zig Native C

seer build compiles C mods with zig cc, for every target from one machine.

VS Code Recommended

rust-analyzer for Rust, Luau LSP or the Lua extension (sumneko.lua) for Lua mods with seer_api/lua/seer.d.luau.

Rust toolchain
rustup default stable
rustup target add wasm32-unknown-unknown    # WASM mods only
rustc -vV                                   # host: x86_64-pc-windows-msvc on Windows

2. Download and unzip

The downloads are at the bottom of the page: seer-sdk-windows-x86_64.zip (the crates, headers, type definitions and api.ron), seer-cli.zip (the seer command) and example-mods.zip. Unzip all three into the same folder. They share one layout, and the CLI and the examples find the SDK relative to themselves.

Put seer on PATH
:: unzip seer-sdk-windows-x86_64.zip, seer-cli.zip and example-mods.zip into C:\seer
setx PATH "%PATH%;C:\seer\tools\seer"
:: open a new terminal, then:
seer --help
C:\seer after unzipping
C:\seer\
  seer-sdk\seer\  seer-macros\  seer-sys\     the Rust SDK crates
  seer-sdk\examples\hello\  hello-lua\  hello-wasm\
  seer-script-lua\examples\hello\            a Lua mod that uses require()
  seer_api\api.ron                            THE API definition
  seer_api\include\seer.h                     C header
  seer_api\lua\seer.d.luau                    Lua types
  seer_api\wasm\seer_guest.rs  seer_api\wit\  WASM bindings
  seer_api\docs\index.html                    API reference (offline)
  tools\seer\                                the seer CLI

No PATH change? py C:\seer\tools\seer\seer.py ... works everywhere seer ... does. Exit code 0 is success, 1 means errors were found, 2 is a usage error.

3. Build the examples

The three examples are the same mod (an FPS HUD line, a /hello command, a tooltip line on diamonds and a chat spam filter) written for each runtime. Each folder has a README.

pack all three
cd C:\seer\seer-sdk\examples\hello
seer pack                 :: cargo build --release --target x86_64-pc-windows-msvc, check, pack
                          :: -> build\hello-0.1.0.seerm
cd ..\hello-lua
seer pack                 :: nothing to build -> build\hello_lua-0.1.0.seerm
cd ..\hello-wasm
seer pack                 :: cargo build --release --target wasm32-unknown-unknown -> mod.wasm
                          :: -> build\hello_wasm-0.1.0.seerm

Install a package by copying it into the mods folder, then start the client:

install
copy build\hello-0.1.0.seerm "%APPDATA%\.seerclient\mods\"

4. Create a project: seer new

seer new
cd C:\seer\mods-dev                 :: anywhere outside C:\seer\seer-sdk
seer new my_mod                     :: native Rust (the default)
seer new my_mod --lang c            :: native C
seer new my_mod --lang lua
seer new my_mod --lang wasm         :: Rust compiled to a core wasm module
:: options: --dir D  --name "My Mod"  --force
--langYou get
rustCargo.toml (cdylib + rlib, seer = { path = "C:/seer/seer-sdk/seer" }), src/lib.rs with a HUD layer, a command and an ItemTooltip listener
csrc/mod.c: seer_mod_entry registering an ItemTooltip listener (include dir seer_api/include)
luamain.luau with one seer.on("ItemTooltip", ..) listener; "file": "main.luau"
wasmCargo.toml (cdylib, its own [workspace]), .cargo/config.toml (wasm32 target), src/lib.rs = the hello-wasm example, src/seer_guest.rs; "file": "mod.wasm"

Every scaffold also has seer.mod.json (with "seer_api": {"version": "1.1"}) and a .gitignore, and passes seer check. The id is lowercase letters, digits, _ and -.

5. The manifest: seer.mod.json

A manifest is a Seer mod when it has a "seer_api" block.

seer.mod.json
{
  "schemaVersion": 1,
  "id": "my_mod",
  "version": "0.1.0",
  "name": "My Mod",
  "description": "What it does.",
  "authors": ["you"],
  "license": "MIT",
  "environment": "client",
  "runtime": "native",
  "seer_api": { "version": "1.1" },
  "permissions": ["chat.send"],
  "bin": { "x86_64-pc-windows-msvc": "bin/x86_64-pc-windows-msvc/my_mod.dll" }
}
FieldMeaning
schemaVersionMust be 1.
idLowercase letters, digits, _ and -. Also the folder name of the mod's data: <game dir>/config/<id>/.
versionSemantic version; seer pack names the package <id>-<version>.seerm.
name, description, authors, license, iconMetadata shown in the mod list and the library.
environment"client" (or "*"). A server-only mod is skipped.
runtime"native" (default), "lua" or "wasm".
seer_api.versionThe API MAJOR.MINOR the mod is built against. The game refuses a different MAJOR or a newer MINOR. Current: 1.1.
permissionschat.send, network.http, fs.config, screen.open, input.override, render.offscreen, clipboard. An unknown name refuses the mod.
binNative only: target triple to the library in the package. seer build fills it in.
fileLua / WASM: the entry file (default main.luau, or mod.wasm).
afterIds of mods to load before this one.
limitsLua / WASM: { "timeout_ms": .., "memory_mb": .. } per callback / per instance.
depends, breaksFabric-style version predicates on other mod ids (minecraft, seer, any mod), checked at launch.

Paths the manifest names (bin, file) must stay inside the mod: relative, no .., no drive letter.

6. Native Rust

#[seer::mod_main] marks the init function and writes the seer_mod_entry export; it finds every #[seer::event] function in src/ itself. An event's wrapper is named like the event (ItemTooltip); a two-part name can be written ChatReceive::Allow, ClientTick::End. A listener returns (), a Flow or a bool (false cancels), and takes priority = LOWEST | LOW | NORMAL | HIGH | HIGHEST | MONITOR and receive_cancelled = true.

src/lib.rs
use seer::prelude::*;

#[seer::mod_main(id = "my_mod", name = "My Mod")]
fn init(m: &mut ModInit) {
    m.hud_layer("my_mod:fps", HudAnchor::After(Vanilla::Hotbar), |g, ctx| {
        g.text(&format!("FPS {}", ctx.fps()), 4, 4, 0xFFFFFF);
    });
    m.command("my_mod", |cmd| cmd.executes(|c| { c.feedback("Hi!"); Ok(()) }));
}

#[seer::event(ItemTooltip)]
fn tooltip(e: &mut ItemTooltip) {
    if e.stack().is(items::DIAMOND) { e.lines().push(text!("Shiny" gold)); }
}

#[seer::event(ChatReceive::Allow, priority = HIGH)]
fn filter(e: &mut ChatReceive) -> Flow {
    if e.plain().contains("spam") { Flow::Cancel } else { Flow::Continue }
}

ModInit also has keybind, block, item, block_entity_type, entity_type, menu_type, registry_entry and data_component; the modules seer::widgets, seer::world (server address, dimension, the mod's data files), seer::model (entity model parts) and seer::content cover the rest, and seer::sys is the raw host table for everything else. Release builds keep panic = "unwind": the SDK catches a panic in a listener and the game drops that mod's listeners instead of crashing.

7. Native C

Include seer_api/include/seer.h, export seer_mod_entry and return SEER_API_VERSION. Before calling a host function added after 1.0, check it with SEER_HAS(host, fn). seer build uses zig cc for every target.

src/mod.c
#include "seer.h"

static SeerFlow on_tooltip(void *user, void *args) {
    SeerItemTooltipArgs *a = (SeerItemTooltipArgs *)args;
    (void)user; (void)a;
    return SEER_FLOW_CONTINUE;
}

__declspec(dllexport)
uint32_t seer_mod_entry(const SeerHostApi *host, const SeerModInit *init) {
    host->register_listener(init->mod_handle, SEER_EV_ITEM_TOOLTIP, SEER_EV_ITEM_TOOLTIP_HASH,
                            SEER_PRIORITY_NORMAL, 0, 0, 0, on_tooltip, 0);
    return SEER_API_VERSION;   /* 0 = init failed */
}

8. Lua

Every host function is seer.<name> (and seer.<first>.<rest>, so seer.chat.send is seer.chat_send). Event fields have their api.ron names; struct fields are flattened (e["pos.x"]); writing out on an override event marks it set. seer.log/warn/error, seer.has_permission, seer.config.read/write (with fs.config) and require("a.b") (inside the mod folder only) are built in.

main.lua
local DIAMOND = seer.registry_id(1 --[[Item]], "minecraft:diamond")

seer.hud_layer_register("my_mod:fps", 3 --[[AFTER]], "minecraft:hotbar", function(gui, hud)
    seer.gui_text(gui, "FPS " .. seer.fps(), 4, 4, 0xFFFFFFFF, true)
end)
seer.command_register("my_mod", function(ctx) seer.command_feedback("Hi!"); return 1 end)

seer.on("ItemTooltip", function(e)
    if seer.stack_item_id(e.stack) == DIAMOND then e.lines:push("Shiny") end
end)
seer.on("ChatReceiveAllow", function(e)
    if string.find(e.plain, "spam", 1, true) then return seer.CANCEL end
end, { priority = seer.PRIORITY.HIGH })

9. WASM

The runtime loads a core module (wasm32-unknown-unknown) that imports module "seer" and exports memory, seer_init() -> i32 (0 = success) and seer_dispatch(callback, user) -> i32. You choose a callback number for every listener, HUD layer and command; the host calls seer_dispatch with it. Host functions go through seer::call(seer::fn_id(seer::fns::GUI_TEXT), args, n, out) with Value arguments. For Rust, seer_api/wasm/seer_guest.rs is the binding (seer new --lang wasm copies it in).

src/lib.rs (outline of hello-wasm)
#[no_mangle]
pub extern "C" fn seer_init() -> i32 {          // once; register everything here
    unsafe {
        let name = seer::events::ITEM_TOOLTIP;   // "ItemTooltip"
        let ev = seer::event_id(name.as_ptr(), name.len() as i32);
        F_LINES = seer::field_index(ev, "lines".as_ptr(), 5);
        seer::on(ev, CB_TOOLTIP, 0, 0, 0);       // event, callback number, user, priority, flags
    }
    0
}

#[no_mangle]
pub extern "C" fn seer_dispatch(callback: i32, _user: i32) -> i32 {
    match callback {
        CB_TOOLTIP => { /* seer::lines_insert(F_LINES, ..) */ 0 }
        _ => 0,                                  // 1 cancels a cancellable event
    }
}

10. Check, build and pack

from the project folder
seer check                    # manifest, API version, every event name, permissions vs host fns used
seer check --strict           # warnings are errors
seer build                    # native: for this machine; --target all | windows-x86_64 | linux-x86_64 | ...
seer pack                     # build, check, write build\<id>-<version>.seerm and print its sha256
seer pack --split --target all   # one .seerm per platform
seer verify build\my_mod-0.1.0.seerm
  • seer pack builds for this machine first (Lua: nothing to build), stops on check errors unless you pass --force, and packs seer.mod.json, the binaries in bin or the script / module, assets/, data/, scripts/, icon.png, LICENSE and README.md, plus a SHA-256 integrity manifest.
  • Your assets/ and data/ load as a hidden built-in resource pack: models, textures, lang files and sounds for the blocks, items and sounds you register.
  • Cross targets: Linux from Windows uses cargo zigbuild, Windows from elsewhere cargo xwin. Android and iOS link the mod into the game: seer build --target android-arm64 --builtin <RustSrc>.

11. Run it in the game

seer dev / seer run
seer config game "C:\path\to\seer.exe"   # once; stored in %APPDATA%\seer\config.json
seer dev                    # build, start the game with this folder as a dev mod, rebuild on save:
                            # native mods are reloaded in place, Lua / WASM by their plugin
seer run                    # pack, then start the game with MCRUST_ADD_MODS=<the .seerm>
seer run --folder           # load the project folder itself, no pack
seer run --dry-run          # print the environment and command line only
seer run -- --gameDir C:\seer-dev    # everything after -- goes to the game

Point seer config game (or --game, or SEER_GAME) at the client's executable. Neither command copies anything into your mods folder.

12. Debugging

  • A mod that does not load is reported in the game's log as [SeerClient] mod not loaded: mod `id` (folder): reason; the game keeps running without it.
  • Your own lines: seer::info! / warn! / error!, seer.log in Lua, the log host function in C and WASM. Each line carries the mod id. Log once per kind of event, never per frame.
  • A listener that never runs: check the name with seer check, the thread (scripts cannot listen to Net / Any events), the filter ids, and whether an earlier listener cancelled the event.
  • A registration that answers -5 (FROZEN) came after the mod's init: register HUD layers, commands, key bindings, screens and content in init.
  • Lua / WASM watchdog: a callback that runs past limits.timeout_ms is stopped and the error is logged.

Common errors

built for Seer API 1.0; this game speaks 2.0 (major differs - rebuild the mod)

The API MAJOR changed: rebuild against the new SDK. "this game is older (..) - update the game" is the opposite case: the mod asks for a newer MINOR than the client has.

layout hash ... differs from the game's ... at the same API version

The mod was built against a different seer-sys than the game at the same version number. Rebuild it against the SDK of this release.

no binary for this platform (x86_64-pc-windows-msvc) in "bin"

seer build for that target, then pack again; seer check warns about every bin entry that is not built.

no `seer_mod_entry` export - not a Seer event-API mod

A Rust mod needs #[seer::mod_main] on its init function; a C mod must export seer_mod_entry (__declspec(dllexport) on Windows).

seer check: no event `ItemTooltips` in the API definition (did you mean ...)

A typo, or an event this API version does not have. The API reference lists every event and its arguments.

uses `chat_send` which needs permission `chat.send`

Add the permission to "permissions" in seer.mod.json. Script mods are refused the call without it.

the package was modified after it was packed; refusing it

An entry no longer matches META-INF/seer.sha256. Never edit a .seerm in place: repack with seer pack.

A mod built for API 1.0 keeps loading on a 1.1 client: the API only grows within a MAJOR version, and a mod checks for newer host functions before calling them. Rebuild when the MAJOR changes.

Downloads

For Seer 0.4.x / Minecraft 26.3 / API 1.1

Unzip all three into the same folder (for example C:\seer): they share one layout, so the examples and the CLI find the SDK without any setup. A mod built for API 1.x keeps loading on every client whose API is 1.x and at least as new.