designs / gpui
The desktop (GPUI) variant of the Fluid Attacks design system. The web variant
in designs/src is the source of truth; this workspace projects its tokens and
components onto gpui for Rust desktop apps
(common/mrq today, signals when it migrates).
Layout
Follows the federated Rust standard (common/utils/rust):
crates/domain—fluidattacks-designs-domain: the design tokens and per-component styling decisions, pure andno_std, usable from any toolkit on any platform. Grows one component at a time; the web files each module mirrors are named in its docs.crates/shell—fluidattacks-designs: the GPUI widgets over those tokens. macOS-gated with their toolkit for now, mirroring mrq (gpui's Linux build needs a native windowing stack the Linux CI runners don't carry).
Catalog
cargo run --example gallery opens the native component catalog (macOS). A
browser gallery in the spirit of gpui-component's
story-web (gpui compiled to wasm) is the intended long-term storybook
equivalent; it stays out of scope until gpui's wasm backend ships in a
crates.io release, because the federated cargo-deny policy pins all
dependencies to crates.io (allow-git = []).
Fonts
nix build .#designs-gpui-fonts materializes the design system's faces (Roboto,
Space Mono) hermetically; the gpui dev shell exports the directory as
FLUIDATTACKS_DESIGNS_FONTS and Theme::init registers every face it finds
there. Consuming apps must export the same variable from their launch wrappers
when they adopt the crate (the way mrq's launcher already exports
MRQ_COMMIT). Without it, text renders with the platform fallback.
Checks
Same jobs as every Rust component, from the designs flake:
nix run .#designs-gpui-lint— fmt, clippy, deny, machetenix run .#designs-gpui-conformance— federated config drift checknix run .#designs-gpui-test— nextest behind the coverage ratchetnix develop .#gpui— the Rust dev shell