惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Last Week in AI
Last Week in AI
U
Unit 42
博客园 - 【当耐特】
Y
Y Combinator Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Microsoft Security Blog
Microsoft Security Blog
Recent Announcements
Recent Announcements
P
Proofpoint News Feed
Martin Fowler
Martin Fowler
量子位
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
有赞技术团队
有赞技术团队
aimingoo的专栏
aimingoo的专栏
博客园 - 司徒正美
美团技术团队
雷峰网
雷峰网
小众软件
小众软件
G
Google Developers Blog
GbyAI
GbyAI
Jina AI
Jina AI
爱范儿
爱范儿
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
F
Fortinet All Blogs
Vercel News
Vercel News

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
I got tired of typing nasm/ld/gcc by hand, so I built a t...
Alex Voste · 2026-05-18 · via DEV Community

If you've ever written assembly or C without CMake, Makefiles, or any build system — you know the ritual.

Open terminal. Remember the flags. Compile one file. Then another. Then link them. Then mess up the argument order. Then do it again. And again. Every. Single. Time.

I did this long enough to finally say: enough.

That's how fz (ForgeZero) was born — a small CLI tool written in Go that takes all the assembly/C build drudgery off your plate. No extra dependencies. No 300-line config files. It just works.


What it actually does

Build a single file — one command

fz -asm hello.asm
fz -cc main.c

Enter fullscreen mode Exit fullscreen mode

No need to remember nasm, fasm, or gcc flags. fz figures out what it's looking at and spits out a binary.

Build an entire project — also one command

fz -dir ./src

Enter fullscreen mode Exit fullscreen mode

Recursively finds all .asm, .s, .fasm, and .c files, compiles each into an object file, then links everything together. Object filenames are unique, so hello_asm.o and hello_s.o don't step on each other.

SHA256 caching — because waiting is pain

Incremental builds without changes are near-instant. fz hashes each source file + build flags, and if nothing changed, the compiler doesn't even get invoked. That's it.

Strict mode for C — no escape from quality

C files are compiled with the full warnings-as-errors suite:

-Wall -Wextra -Werror -Wpedantic -Wshadow -Wconversion

Enter fullscreen mode Exit fullscreen mode

AddressSanitizer and UBSan are on by default. The -strict flag adds use-after-return and use-after-scope, and automatically prefers clang if it's available, falling back to gcc with limited support.

Don't want sanitizers? -no-sanitize. Done.

Watch mode — because hitting ↑ Enter is still too many keystrokes

fz -watch -dir ./src

Enter fullscreen mode Exit fullscreen mode

Watches your source files and config for changes, rebuilds with a 500ms debounce. Save a file, and a second later you've got a fresh binary.

JSON output — for your CI/CD pipelines

fz -json -dir ./src

Enter fullscreen mode Exit fullscreen mode

Returns structured JSON: status, exit code, build time, list of sources and object files, binary name, error message. Easy to parse in any pipeline, no string-scraping needed.

Config file — set it and forget it

Drop a .fz.yaml in your project root and stop passing flags every time:

source_dir: ./src
output: my_program
mode: auto
debug: false
keep_obj: false
exclude:
  - legacy/

Enter fullscreen mode Exit fullscreen mode

Also accepts fz.yaml, .fz.yml, fz.yml — whatever you prefer.


Three linker modes

Not all projects are the same, so you can pick:

Mode What it does
auto Tries gcc, then gcc -no-pie, then ld
c Only gcc (for C projects)
raw Only ld (for pure assembly)

fz also checks for duplicate symbols before linking via nm / objdump, so you get a clean, readable error instead of a linker wall of text.


Linters & formatters

Since fz builds real C and assembly, it plays nicely with the tools you're already using:

C:

  • clang-format — format your sources before/after build
  • clang-tidy — static analysis; pairs well with fz's strict mode
  • cppcheck — extra static checks on top of GCC/clang warnings
  • splint — if you're into really paranoid C checking

Assembly (NASM/GAS):

  • asmfmt — NASM formatter (like gofmt, but for asm)
  • nasm -E — preprocessor pass to inspect macro expansion
  • GAS has no official formatter, but indent-style scripts exist in the wild

Go (fz itself):

  • gofmt / goimports — standard Go formatting
  • golangci-lint — runs staticcheck, errcheck, govet and a bunch more in one shot
  • go vet — built-in static analysis

The philosophy: fz enforces quality at the compiler level (warnings as errors, sanitizers), and you layer your preferred linter on top.


Installation

go install github.com/forgezero-cli/ForgeZero/cmd/fz@latest

Enter fullscreen mode Exit fullscreen mode

You just need Go, plus whatever compilers you're already using (nasm, gcc, fasm). That's it. No package manager drama.


Roadmap (v1.4.0 → v1.5.0)

Here's what's coming:

  • C++ support.cpp files → g++, same strict flags
  • Custom flags-asm-flag, -cc-flag, -ld-flag for when you need to pass something weird
  • Exclude patterns-exclude in CLI and exclude: in config
  • Better error messages — with hints like "did you forget #include <stdio.h>?"
  • Colored output — errors in red, success in green, respects NO_COLOR
  • CI/CD matrix — automated tests on Linux, macOS, Windows
  • Packages — Homebrew tap and AUR package
  • Shell completions — bash, zsh, fish

Current state

Version 1.3.0 is stable, production-ready, with ~70% test coverage, a built-in man page (fz -man), and a colored --help with grouped options and examples.

If you write low-level code and this pain sounds familiar — give it a shot. Feedback and ⭐ on GitHub are always appreciated.

github.com/forgezero-cli/ForgeZero