Documentation
¶
Rendered for js/wasm
Overview ¶
Command gsx-wasm is the client-side playground engine. It runs the gsx transform (gsx -> Go) and the gsx formatter entirely in the browser — no go list, no subprocess — exposing two JS functions:
gsxTransform(source) -> {files: [{name, code}], diagnostics}
gsxFormat(source) -> {formatted} | {error}
Rendering the generated Go to HTML is NOT done here (a browser has no Go compiler, and an interpreter can't handle component composition); the site posts the generated files to the playground server's /run instead.
Build: GOOS=js GOARCH=wasm go build -o gsx.wasm ./playground/wasm
Click to show internal directories.
Click to hide internal directories.