Built a small Go + WASM CLI to simplify my workflow

Hey everyone,

I wanted to share something I’ve been working on called Tofus.

It actually started as a byproduct of a Go + WebAssembly UI builder library I’m building. While working on that, I kept repeating the same build and serve steps over and over, so I decided to turn that workflow into a small CLI.

The idea is pretty simple:

  • Scan a src/ directory

  • Build every folder containing a main.go into main.wasm

  • Copy all non-Go assets into a matching build/ directory

  • Serve everything with routes created automatically

That lets me keep everything under src/, run a single command, and have a ready-to-go build/ directory with all my WASM apps and assets.

Right now it can:

  • Build multiple WASM apps in one go

  • Keep CSS, JS, HTML, images, fonts, and other assets in sync

  • Automatically expose each app on its own route

  • Serve static files with almost no setup

I just released v0.1.0, so it’s the first public release. It’s already become a core part of my own workflow, and I figured it might be useful to others working with Go + WASM too.

If it looks interesting, I’d love for you to check it out, try it, or even contribute. Feedback, ideas, and feature requests are always welcome. Since I’m actively building the UI library alongside Tofus, there’s plenty of room to improve the developer experience.

Looking forward to hearing what you all think. - Link

1 Like