1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//! # islands-build — the islands.rs build pipeline, as a library
//!
//! Everything needed to **build** an islands.rs app, decoupled from any one
//! repository's layout. A thin `xtask` (this repo's, or a downstream consumer's)
//! constructs a [`BuildPlan`] — from an [`IslandsConfig`] (`islands.toml`) or its
//! own discovery — and calls [`build`].
//!
//! The pipeline:
//! 1. **WASM** ([`wasm::build_wasm`]): resolve + install the matching
//! `wasm-bindgen-cli`, compile the runtime ([`wasm::build_runtime`]) and page
//! crates to `wasm32-unknown-unknown`, run `wasm-bindgen --target web`, verify
//! the artifacts, and apply the load-bearing [V8 namespace patch](patch).
//! 2. **CSS** ([`css::build_css`]): build the shared `base.css` and a per-page
//! Tailwind bundle for each page (optionally materializing `basecoat.css`).
//! 3. **Manifest** ([`hashing::post_build_hashing_pass`], gated by
//! [`BuildPlan::manifest`]): content-hash every asset, rewrite cross-asset
//! references, and write `manifest.json`. Off ⇒ logical filenames, resolved by
//! `page_shell`'s logical-path fallback.
//!
//! The [V8 namespace patch](patch) is exported as a first-class, tested API:
//! skipping it produces a bundle the browser refuses to instantiate, so no
//! consumer should ever have to rediscover it.
pub use ;
pub use ;
pub use IslandsConfig;
pub use post_build_hashing_pass;
pub use ;
pub use ;
pub use ;
pub use materialize_basecoat_css;
use Result;
/// Run the full build: WASM (runtime + pages) → CSS → (optional) content-hash +
/// manifest.
///
/// Does **not** clean `out_dir` first — cleaning policy (which directories to
/// wipe, which checked-in inputs to preserve) belongs to the caller.