Documentation
¶
Overview ¶
Command modlock-sdkgen generates each language's mod library and the host's dispatch from the Host and Mod services in proto/modlock/wasm.proto, the single source of the boundary between the game and a mod. Run it from the repository root:
modlock-sdkgen
It compiles the schema with the protoc that go-protoc-wasi runs in process, reads the descriptors with their comments, and writes:
- js/src/host.gen.ts: the TypeScript calls, classes, types and event dispatch.
- mod/host.gen.go: the same for Go.
- luau/modlock/init.luau: the same for Luau, followed by the handwritten luau/library.luau.
- python/modlock/__init__.py: the same for Python, followed by the handwritten python/library.py.
- src/wasm/host_service.gen.h: the host's service with one virtual method per call, its dispatch by method name, and the client that delivers events to a mod.
The conventions it follows are stated at the top of the schema.
Click to show internal directories.
Click to hide internal directories.