Skip to content

v0.6.2

Latest

Choose a tag to compare

@tanmaymishu tanmaymishu released this 31 Oct 09:52
· 2 commits to main since this release

Scaffold speed: the Go side of the reload loop.

.air.toml now strips the binary and drops a flag that did nothing

- cmd = "CGO_ENABLED=0 go build -gcflags='-N -l' -o ./tmp/main ./cmd/app"
+ cmd = "CGO_ENABLED=0 go build -ldflags='-w -s' -o ./tmp/main ./cmd/app"

A reload pays for a megabyte twice — once linking it, once faulting the new binary in on its first execution. The second is easy to miss: measured on a real application, a freshly linked 52MB binary took 2.6s to reach its port where the same binary re-run took 0.08s, and all twenty providers plus every package init() together were 83ms. So almost all of a reload's startup is loading the file, at roughly 50ms per megabyte. Stripping took 13.8MB off that application.

-gcflags='-N -l' is removed rather than kept alongside: Go applies -gcflags only to the packages named on the command line, so it de-optimised ./cmd/app alone while every other package stayed optimised. No debuggability worth having, and the binary measured the same size either way. The config says what to use when you do want a debugger.

Pins mcp v0.3.0, the release that adds WithTools — without it a project cannot wire observe's MCP tools, which observe's own doc comment tells people to do.

Verified by handing the config to air in a throwaway project: it parsed, built, and the result has no symbol table.

Scaffold version 2.27.0.