Skip to main content

Module build

Module build 

Source
Expand description

Build-script support: the generated files every webview consumer materialises from its build.rs, and the checks that keep its hand-written frontend agreeing with them.

Behind the build feature, so a runtime consumer of the renderer does not link makeover’s theme set. A consumer takes this crate twice: as a dependency for the markup and as a build-dependency with features = ["build"] for these files. links holds both to one version.

Every consumer materialises the same generated files from a build.rs. This is that code, once.

§Density

geometry_css keys the touch preset on capability: touch hangs off “not a fine, hovering pointer” and never off a user-agent string or a breakpoint. An app with a manual override passes the selector it sets to explicit_touch.

§Why these files are generated rather than checked in

Tauri’s resource globs are read by its CLI against the crate directory, so they cannot point into a registry checkout or OUT_DIR. Materialising into the crate keeps the source crate authoritative without vendoring a second copy that drifts. Every path written here is expected to be gitignored.

§The other half: what is checked rather than written

A consumer’s frontend is not all generated. The stylesheet and the scripts are hand-written and state some of the same facts the generated files ask the crates for, so they can drift where a generated file cannot. drift holds the checks that keep them honest, and they are assertions rather than substitutions on purpose: a file that has to be generated to be correct stops being readable on its own.

Re-exports§

pub use drift::Allow;
pub use drift::Breakpoints;
pub use drift::Vocabulary;
pub use drift::check_touch_density;
pub use drift::check_vocabulary_use;

Modules§

drift
Checks that a hand-written frontend still agrees with the crate that generates its siblings.

Structs§

FontFace
Layer 0 of the font model, re-exported for the same one-dependency reason.
FontOverride
Layer 0 of the font model, re-exported for the same one-dependency reason.
Typography
Layer 0 of the font model, re-exported for the same one-dependency reason.

Enums§

FontSlot
Layer 0 of the font model, re-exported for the same one-dependency reason.

Constants§

WEBFONT_MONO_FILE
The filenames typography_css’s @font-face rules fetch.
WEBFONT_SANS_FILE
The filenames typography_css’s @font-face rules fetch.

Functions§

geometry_css
Write makeover-geometry’s spacing layer, with its canonical density selection, to path.
layout_css
Write makeover-webview’s component stylesheet to path.
tauri_frontend
All the generated files at the layout every Tauri consumer already uses: themes/ beside the manifest, and frontend/css/{geometry,timing,layout,typography}.css under it.
tauri_frontend_with
tauri_frontend, for a product that overrides a font slot.
themes
Write the themes makeover ships into dir, as <id>.toml.
timing_css
Write makeover-timing’s time axis, and the motion-off block that rides with it, to path.
typography_css
Write the house typography layer to path: the two @font-face rules and the two tokens they back.
typography_css_from
typography_css, for a product that overrides a slot.