Yo, AlexVoste back again.
Not long ago I wrote about my ForgeZero builder written in vanilla Node.js – zero dependencies, pure pain. Well, time flies, and I've moved to something lighter and more modern.
I rewrote the whole damn thing in Go, added new flags, the ability to link entire directories in one shot. Meet fz – the assembly Swiss Army knife that just works.
Why though?
If you ever touched assembly (NASM, GAS, FASM), you know the drill: run nasm, then gcc, then ld, don't forget the flags, and for multi‑file projects – manually list every object file. It gets old real fast.
fz boils it down to:
fz -asm boot.asm
or for a whole folder
fz -dir ./src
What's under the hood
- Single file build – fz -asm file.asm → file.o + file (or .exe on Windows).
- Recursive folder build – fz -dir ./kernel finds every .asm, .s, .fasm, assembles each into an object file, then links everything into one binary. Binary name = folder name + .out (or .exe).
- Noise? Shut it – by default external commands (nasm, gcc, ld) stay silent. You only see Built: program.out. If something fails – a short error telling you to try -verbose.
- Auto‑linking – first gcc, then gcc -no-pie, then ld (auto mode). You can force c (gcc only) or raw (ld only) if you're a control freak.
- Debug flag – -debug passes -g down to the assembler.
- Cleanup – fz -dir ./src -clean nukes all .o files, executables, and the .fz_objs temp folder in one go.
- Unique object names – hello.asm and hello.s become hello_asm.o and hello_s.o so they don't step on each other's toes.
Show me the commands
Build a single NASM file with verbose output:
fz -asm hello.asm -verbose
Build a whole project folder into a custom binary:
fz -dir ./src -out myapp
Force raw linking (no libc, pure ld):
fz -asm boot.asm -mode raw
Clean up all artifacts generated by fz:
fz -dir . -clean
Install – two ways (one is super slick)
_ Via go install (recommended, because Go is awesome)_
go install github.com/alexvoste/ForgeZero/cmd/fz@latest
That drops the fz binary into $GOPATH/bin (usually ~/go/bin). Make sure that directory is in your PATH.
_ Old school clone & build_
git clone https://github.com/alexvoste/ForgeZero.git
cd ForgeZero
go build -o fz ./cmd/fz
sudo mv fz /usr/local/bin/
Requirements: you need the tools you're actually using – nasm, gcc, fasm, ld must be in PATH. The builder will politely remind you if something is missing.
What's next
I'm planning to add custom linker scripts, JSON output for CI/CD pipelines, and maybe a watch mode that rebuilds automatically when source files change.
Try it out, open issues, send pull requests – all welcome.
Happy building!

Top comments (0)