Help us shape the future of Go! Take the 2026 Go Developer Survey

modlock-sdkgen

command
v0.1.22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Command modlock-sdkgen generates each language's mod library and the host's dispatch from the Host and Mod services in src/wasm/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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL