modlock-sdkgen

command
v0.1.89 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: MIT Imports: 16 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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