FluxFrame

A website is one view of a larger body of work.

Flux is a web compiler written in Rust. It treats your writing, pages and media as things with their own identity, then compiles them into as many websites as you need, released as one.

The old frame

Most site tools start from a folder of pages. A page belongs to one site, lives at one address, and looks one way. Put the same essay on two sites and you have two copies that drift apart. Run nine sites and you have nine deployments that can each break on their own.

That model made sense when a website was the whole of someone’s work. It doesn’t anymore. People and companies publish one body of work across many places, and the tools still think in folders.

The Flux frame

Artifact + World + Route + View = a page on the web

Artifact
A piece of work with its own identity: an essay, a chapter, a product page. It doesn’t belong to any one site.
World
A context the work appears in, such as a book’s site or a publisher’s catalog.
Route
The address it lives at inside that world.
View
How it looks there. The same artifact can read as a book page in one world and a catalog entry in another.
Planet
A real domain a world is published to.
Constellation
Everything together. It builds, releases and rolls back as a single unit.

One piece of work, many homes

Here a book’s prologue appears on the book’s own site and in the publisher’s catalog. It’s written once. Flux keeps one canonical address so search engines know where it really lives, and both sites update together when it changes.

The work’s identity is separate from where it’s stored, where it appears on the web, the context around it, and how it’s presented. Change any one without touching the others.

# flux.toml
[[artifact]]
id = "too-fragile-prologue"
source = "content/prologue.md"

[artifact.canonical_home]
planet = "too-fragile-web"
route = "/prologue"

[[mount]]
world = "too-fragile"
route = "/prologue"
artifact = "too-fragile-prologue"
view = "book-reader"

[[mount]]
world = "publishing"
route = "/books/too-fragile/prologue"
artifact = "too-fragile-prologue"
view = "publishing-reader"

Nine sites, one release

Every FluxFrame website runs on Flux today: nine domains built together in under a second. Publishing points all nine at the new release in one step, so no site is ever caught half-updated. If something is wrong, one command puts every site back.

Flux also refuses to overwrite anything it doesn’t recognize as its own release, so a live site can’t be clobbered by accident.

flux-web check  flux.toml
flux-web build  flux.toml out/
flux-web publish out/releases/<id> /srv/sites
flux-web rollback /srv/sites

Static unless it says otherwise

A page compiles to plain files unless its view declares something it needs while it runs. Most pages need nothing, so most of a site ships as files a server only has to hand over. When a page does need live behavior, it says so, and only that page carries it.

The evidence

Every claim about Flux is tested against fixed thresholds written down before the first run, with correctness checks on the output.

Time to build a million pages

Flux77.0 s
Zola95.8 s
Hugo163.9 s

Memory used

Flux6.3 GiB
Zola17.3 GiB
Hugo22.8 GiB

Benchmark G001: three runs per tool on an i9-9900K, Hugo 0.166.0 and Zola 0.23.6. Flux was 1.24 times faster than Zola and 2.13 times faster than Hugo.

Same input, same output

Fifteen builds of a 117,071-file site, run with anywhere from 1 to 16 threads, produced identical output every time.

Failures count

We tried moving folder creation out of the parallel render step. It passed every correctness check and made builds slower, so we measured it, wrote it up and reverted it.

Why this is where the web is going

Work outlives websites

Sites get redesigned, renamed and shut down. In Flux the work keeps its identity no matter where it appears or how often the site around it changes.

One person can run a network

Building, releasing and rolling back many sites used to take a team. With one constellation it takes one command.

Less running, less to break

Compiled pages have no server code to patch or attack. Live behavior is opt-in, page by page.

Claims come with proof

Benchmarks ship with their correctness checks and the code to reproduce them, including the runs where Flux lost.

Put your site on Flux.

If you run more than one site, publish the same work in several places, or just want a site that can’t fall over, tell us about it.

[email protected]