mod.json
mod.json is what a mod's bootstrap passes to
sm.allthelanguages.register. It's the module's metadata
plus its bytecode. atl-build writes it, as a .json
next to each .wasm module.
{ "id": "example.hellocpp", "name": "Hello C++", "version": "1.0.0", "author": "AllTheLanguages", "language": "c++", "dependencies": [], "wasm": "AGFzbQEAAAAB..."}| Key | Type | Meaning |
|---|---|---|
id |
string, required | Unique id of the module. Other modules depend on it and Lua mods look it up by it. |
name |
string | Shown in log messages. |
version |
string | Shown in log messages. |
author |
string | |
language |
string | The source language, for example c, c++ or rust. |
dependencies |
list of strings | Ids of other modules that must be registered first. |
trapPolicy |
string | "continue" keeps the mod running after a failed call instead of disabling it. |
wasm |
string | The module's bytes, base64 encoded. |
When atl-build packs a module, a .json with the same name next to the .wasm provides
these keys (everything except wasm), and missing ones get
defaults.