Adom Hydrogen
Public Made by Adomby adom
The whole Adom experience as one signed native app: your editor, your AI agent, and the full electronics design toolchain, running locally on your own machine.
Build time: split hydrogen-control (27k-line lib.rs), an insiders profile, and frontend-only builds that skip Rust
Plan for the week of 2026-09-07, from John: "record your plan so we can do it next week". Every insiders build today took ~15 minutes, and the numbers say why.
Measured (2026-09-04)
| Piece | Size |
|---|---|
hydrogen-control/src/lib.rs, one file |
27,478 lines |
| hydrogen-app crate | 35,079 lines |
| All Rust, five crates | 70,015 lines |
| Frontend, Svelte + TS | 205,182 lines |
| Dependency crates (Cargo.lock) | 643 |
The build IS incremental at the crate level: the last log shows exactly two crates compiled (the app and hydrogen-control), the other 641 came from cache. The time is the two giant crates in release mode, where intra-crate incremental compilation is off, so a one-line change in the 27k-line file recompiles all of it and then the app crate that depends on it.
The plan, in payoff order
- Split
hydrogen-control/src/lib.rsinto modules, then into crates. Natural seams already exist in the file: the control HTTP server and routing; AI threads (tabs mirror, run-prompt jobs, hooks); permissions (mirror, dismiss, self-heal); wake and workspace health; the code-server/proxy bits. Modules first (mechanical, one PR, zero behaviour change), then crates so a change rebuilds a slice. This is the change that pays back on every build afterwards. - An insiders release profile.
[profile.insiders]inheriting release withincremental = true,codegen-units = 16,lto = "thin"; the build task uses it for insiders and keeps the fullreleaseprofile for public promotions. Expect a large cut on the recompile half of the wall clock. - Frontend-only builds must not touch Rust. Every insiders build bumps
versionin Cargo.toml, which forces the app crate to recompile even when only Svelte changed. Options: stamp the insiders build number into a file the app reads at runtime (Cargo version stays at the public version), or bump Cargo only when Rust changed. Either way a frontend-only insiders build becomes pnpm + NSIS + sign, a couple of minutes. - Fix the build task itself.
C:\tmp\ah-installer-task.ps1writesexit 0to its done-file even whentauri buildexits 1 (it happened twice today and cost a cycle each time); it appends to one log forever (30k lines, mixed encodings); and it has no timestamps, so the phases cannot be timed. Write the real exit code, rotate the log per build, stamp each phase (pnpm, cargo, bundle, sign) so the next measurement is exact. - Pre-build lints. Ten scripts run before Tauri; measure them once and move any slow one to CI instead of the release path.
What not to do
Do not cargo clean between builds and do not bump the dependency set casually: the 641-crate cache is what keeps this at 15 minutes instead of 45.