A Linux distribution pre-release
Laft is a Linux distribution built from source, with all of its tooling written in Rust. Packages live in a content addressed store, and applying the configuration builds a new, immutable generation of the system. The machine switches to it in one atomic step and keeps the previous one to go back to.
/run/laft/system -> mounts/1one rename(2) switches every path below /usr and /etc/staticdone generation 1 is the default for the next boot
Six ideas shape the whole design. Laft's tools enforce each one, so they hold on every machine instead of depending on convention.
Packages, users, /etc, filesystems, the boot loader and services are described in Stav, a typed configuration language. The whole file is checked before anything changes.
laft checkEvery package unpacks once into /laft/store, named by the BLAKE3 hash of its manifest. Entries are immutable, so many versions of a package can sit side by side.
/laft/store/7ah4dyc3…-runit-2.3.1+staticEach /usr is a complete tree assembled from store entries with hardlinks. Nothing is copied, and the system view is just the view that /usr points at.
/usr -> /run/laft/system/usrApplying the configuration builds a new numbered generation and switches to it with one rename. The previous one stays whole, in the boot menu and one command away.
laft rollbackServices are declared once, with dependencies and readiness checks, and rendered for runit. Between generations, Laft works out which services to start, stop or restart.
service sshd { after = [sshd-keygen] }Every package is built from pinned sources in a sandbox with no network, bootstrapped from a cross toolchain, and checked to rebuild byte for byte.
laft-build check-repro This is part of the configuration that the virtual machine test installs. laft install reads it, resolves five packages from a signed repository and assembles generation 1, with its services and boot entry.
system {
include "./hardware.stav"
hostname = "laft-vm"
packages = [busybox:static, runit:static, limine, laft]
repo core {
url = "file:///repo"
key = "RWTwpAdtxK4dSghH+5P46WIatF4FFuBMOlHyTe1lpy2BU1mZmhNHjZDf"
}
boot {
cmdline = ["console=ttyS0", "quiet", "laft.debug"]
timeout = 1
microcode = force(off)
}
service vmtest-marker {
description = "Print a marker line on the console"
exec = [
"/usr/bin/sh",
"-c",
"echo 'laft-vmtest: marker service is running'; exec sleep 2147483647",
]
log = console
}
getty { ttys = ["ttyS0"] }
}evaluating /mnt/etc/laft/system.stav 2 files 12 ms
resolving system
generation 1
system
+ busybox:static 1.37.0-r1
+ laft 0.1.0-r1
+ limine 11.2.1-r1
+ linux 7.2.13-r1
+ runit:static 2.3.1-r1
services
+ boot-complete
+ getty-ttys0
+ vmtest-marker
...
storing 5 packages
assembling generation 1 135 ms
boot entry 1 installed
activating ok etc ok accounts
done generation 1 is the default for the next boot Every tool along the way is a Laft program, written in Rust and linked statically, so it runs even with an empty /usr.
package.stavPinned sources, a build style and declared dependencies.
laft-buildA sandbox with a view of the build store as /usr and no network.
.lpkgA reproducible archive whose store id is the hash of its manifest.
laft-repoA minisign-signed index whose generation never goes back.
laft applyResolve, assemble and switch to a new generation in one rename.
laft-bootThe initramfs picks a generation, counts the attempt and starts runit.
Laft boots in a virtual machine today, and its test suite installs and boots it end to end. It is not ready for real hardware or daily use yet.
Status and roadmap →One script builds the packages, installs a system onto a disk image and boots it under QEMU. Keep the image, and it is yours to explore.