NFB For Builds.
Describe your toolchain and build steps in a TOML file. NFB runs them in Docker and copies the results back to your machine, so a build works the same on every machine that has Docker.
# build.nfb.toml
[project]
name = "hello"
[build]
image = "debian:bookworm-slim"
command = ["gcc hello.c -o hello"]
[[dependency]]
name = "gcc"
source = "cmd"
command = [
"apt-get update",
"apt-get install -y gcc libc6-dev"
]
[[output.artifact]]
from = "hello"
to = "."$ nfb build
Well hello there~
Let's build hello~
All done~ hello is in /path/to/project/distYou need Go 1.26 or newer to install NFB, and Docker and git to run it.
go install github.com/MyleAtaraxia/nfb@latest- Dependencies from anywhere: a shell command, a git repository, a direct link, a local path or the package store.
- Package store: add a package with
nfb install llvm-mingw. - Packages: a dependency can be its own NFB package, built separately and imported through an
[init]hook. - Pinning:
nfb.lockrecords exact git commits, image digests and checksums. - Fast rebuilds:
/nfb/cachekeeps compiler caches between builds. - Private sources: pass in secrets without storing them in image layers, and fetch with your git setup or a token.
| Command | What it does |
|---|---|
nfb init |
Create a starter manifest |
nfb install <name> |
Add a package from the store |
nfb remove <name> |
Remove a store package |
nfb search [term] |
Search the package store |
nfb build |
Resolve dependencies and build the project |
nfb build --locked |
Build without changing nfb.lock, for CI |
nfb update |
Re-resolve every ref, checksum and image |
nfb graph |
Print the dependency graph in build order |
nfb clean |
Remove fetched repositories and downloads |
nfb -v |
Print the version |
The documentation covers every manifest option and how builds behave.