Build Output and Performance
Understand emitted artifacts, deduped atoms, mode diffs, minification, and current performance notes.
facet build resolves the token graph, scans authoring inputs, and writes static artifacts. The
output is zero-runtime CSS plus optional token exports for other targets.
facet build tokens/app.resolver.json --out dist
facet build tokens/app.resolver.json --out dist --format oklch --minify
Standard outputs
The guide lists these build artifacts:
| File | Purpose |
|---|---|
tokens.css |
CSS variables per mode, emitted as rgb triplets or oklch |
utilities.css |
deduped atomic classes used by scanned code |
tokens.dtcg.json |
pure DTCG export |
tokens.props.css |
@property typing progressive enhancement |
tokens.lightdark.css |
light-dark() progressive enhancement |
native/ |
React Native, Swift, Kotlin, and JS token files |
tailwind.css |
Tailwind v4 @theme preset |
tokens.styledict.json |
Style Dictionary v4 JSON |
demo.html |
simple generated demo |
playground.html |
mode and contrast explorer |
Atom deduplication
Utilities, fx(), and recipes all lower to the same FIR. Identical declarations share one
content-hashed atom, even if they came from different files or authoring surfaces.
{ bg: "action", fg: "on-action", radius: "control", px: "inset.lg", py: "inset.md",
_hover: { bg: "action-hover" }, _focusVisible: { ring: true }, "@md": { px: "inset.lg" } }
The source example says this object intentionally duplicates the button utilities in usage.html,
so it contributes zero new atoms for those shared declarations.
<button class="bg-action fg-on-action radius-control px-inset-lg py-inset-md hover:bg-action-hover focus-visible:ring @md:px-inset-lg">
Primary action
</button>
Mode diff output
The resolver emits the all-default coordinate at :root, then emits only changed token variables
under non-default selectors. For the checked-in graph, that means diffs for selectors including:
.dark[data-brand="globex"][data-brand="verdant"][data-density="compact"]
Atoms reference CSS variables, so changing theme, brand, or density swaps variables without re-emitting utility classes.
Performance status
The design notes report that the owned JavaScript pipeline compiles 50,000 components in about 200 ms in the reference benchmark. The same notes call optimization an in-house future need, not a reason for a Rust or external compiler rewrite.
Treat those numbers as reference-implementation context, not a published service-level guarantee. Facet is still pre-release.