1
0
Fork
You've already forked terranova
0
The new stage3 tarball builder.
  • Rust 100%
Find a file
2026年07月01日 11:10:51 +02:00
.cargo pin musl target 2026年06月30日 18:57:38 +02:00
src i just made some bullshittt 2026年07月01日 11:10:51 +02:00
.gitignore cargo gitignore 2026年06月30日 15:53:42 +02:00
Cargo.lock lockfile 2026年06月30日 18:57:47 +02:00
Cargo.toml fix some imports or i forgot 2026年06月30日 18:57:03 +02:00
LICENSE license file 2026年06月30日 16:22:01 +02:00
README.md Add README.md 2026年06月30日 23:11:24 +02:00

terranova

automated stage3 tarball generator for Static Linux. declarative config, no hand-holding.

what it does

reads a stage3.scheme config and runs a full pipeline:

base layout
 → toolchain (neostrap or clang-dist)
 → rust (rustup)
 → packages (ace, prometheus, promectl, superpose, ...)

output is a rootfs ready to tar up and boot.

usage

cargo build --release
./target/x86_64-unknown-linux-musl/release/terranova

builds default to musl static binaries via .cargo/config.toml.

config

stage3.scheme at the repo root drives everything:

(stage3
 (base-layout
 (dirs "etc" "proc" "sys" "dev" "tmp" "run" "var"
 "usr/bin" "usr/lib" "usr/include"
 "var/lib/ace/ports" "var/log"
 "root" "home"))
 (toolchain
 (mode "neostrap") ; or "clang-dist"
 (neostrap-repo "https://codeberg.org/StaticLinux/neostrap")
 (tcc-seed "./tcc-seed")
 (clang-dist-url
 "https://codeberg.org/StaticLinux/clang-distribution/releases/download/v1.0.0/clang.tar.xz"))
 (rust
 (enabled #t)
 (targets "x86_64-unknown-linux-musl"))
 (packages
 (pkg (name "ace") (build "ninja") (static #t))
 (pkg (name "prometheus") (build "cargo") (target "x86_64-unknown-linux-musl"))
 (pkg (name "promectl") (build "cargo") (target "x86_64-unknown-linux-musl") (depends "prometheus"))
 (pkg (name "superpose") (build "cargo") (target "x86_64-unknown-linux-musl") (depends "prometheus"))))

toolchain modes

  • neostrap - full bootstrap from a 400KB tcc seed. takes 4-8 hours. you know what's in your compiler.
  • clang-dist - grabs the Static Linux prebuilt clang tarball (musl-linked). fast, less auditable.

rust toolchain modes

  • rustup - just a precompiled rustc binary installer Self-hosting the rust compiler is a WIP.

dependencies

  • scheme-ffi - s-expression config parsing
  • anyhow - error handling
  • sha2 - checksum verification