Skip to content

feat: Support building the CLI for js/wasm - #493

Draft
craciunoiuc wants to merge 1 commit into
prod-stagingfrom
cezar/tool-1421-wasm-build
Draft

craciunoiuc wants to merge 1 commit into
prod-stagingfrom
cezar/tool-1421-wasm-build

Conversation

@craciunoiuc

Copy link
Copy Markdown
Contributor

The CLI did not compile for GOOS=js GOARCH=wasm, so the dashboard could not run it in the browser. The build graph reached BuildKit, containerd, Docker, Bubble Tea, a machine fingerprint and a large generated IATA table, none of which the wasm backend accepts.

Commands that need a local daemon, terminal or filesystem now split into !js and js files. The js side keeps the kong structs, so help output is unchanged, and reports that the command belongs to the native CLI. A wasm task builds and compresses the module.

Not yet ready for review

The CLI did not compile for GOOS=js GOARCH=wasm, so the dashboard
could not run it in the browser. The build graph reached BuildKit,
containerd, Docker, Bubble Tea, a machine fingerprint and a large
generated IATA table, none of which the wasm backend accepts.

Commands that need a local daemon, terminal or filesystem now split
into `!js` and `js` files. The js side keeps the kong structs, so
help output is unchanged, and reports that the command belongs to the
native CLI. A `wasm` task builds and compresses the module.

Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io>
@craciunoiuc
craciunoiuc requested a review from jedevc September 7, 2026 16:05
@craciunoiuc

craciunoiuc commented Sep 8, 2026

Copy link
Copy Markdown
Contributor Author

Summary of the call:

  • Do changes in X first
  • Preference order: stub packages in x -> stub packages internal -> stub commands -> partially reimplement for each version
  • Remove iata from the CLI
  • Limit image-spec only for reading stuff
  • Figure out why kraftfile is replaced
  • Stub fingerprint in X
  • Completely disable TUI things

Bonus:

  • Check if https://github.com/rhysd/vim.wasm can be used in the console or any other basic editor
  • Do the changes with the CLI in mind not the console(generic, not a single consumer of the feature)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant