gen

command
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Command gen writes every generated face of the add-on ABI from the one place the ABI is authored, internal/addon/abi.

Three outputs, and the reason there is a generator at all is that they are three views of one list:

  • sdk/, the Go package an add-on imports and compiles for wasip1. Its wasmimport declarations, its wrappers, its error values and its level constants all come from abi.Functions, abi.Statuses and abi.LogLevels.
  • docs/addon-abi.md's function table, between the generated markers. The policy prose around it is written by hand; the table is not, because a hand-maintained table of N functions beside N functions is a table that describes N-1 of them. Written without the number on purpose: the first draft of this comment said ten, twice, and there are eleven.

Run it with `make abi-sdk`, or `make generate`, which is where sqlc and openapi also live. `make check-generate` re-runs it and fails on a diff, so a hand-edited SDK cannot survive CI.

Jump to

Keyboard shortcuts

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