Hive
docs: typed Starlark for build files and plugins; drop WASM
GitHub issue · Closed
Summary
Settles two open design questions: the build definition language and plugin isolation. Both layers are typed Starlark via starlark-rust (Buck2 dialect), evaluated in-process. Impure work (subprocess execution, output parsing, depfile handling) lives in named Rust handlers in the substrate. WASM is dropped from the design and roadmap; revisit only if a third-party plugin author needs untrusted-code isolation.
Also introduces the two-mode story for language plugins:
- Declared mode (
rust_binary,rust_library,rust_test): targets in.fabrikfiles, Fabrik is the source of truth, hermeticity defaults tostrict. What self-hosting Fabrik uses. - Adopted mode (
rust_workspace): points at aCargo.toml, cooperative resolution viacargo metadata, generates declared-mode targets internally. The drop-in adoption story.
Same plugin, two faces. Cache namespaces are kept separate so the same crate built two ways doesn’t accidentally share entries. Integration mode is visible in queries and fabrik cache stats.
Roadmap impact
- Phase 1: Starlark frontend plus declared
rust_binary. NoCargo.tomlreading at this point. - Phase 2: Fabrik’s own crates described in hand-written
.fabrikfiles for self-hosting. - Phase 4 (was “extract plugin contract”): adopted-mode
rust_workspaceplus a second built-in plugin (command) to triangulate the SDK against two real implementations. - Phase 5 (was “build definition language”): scoped down to DSL maturity (profiles, LSP, schema registry) since the language itself is settled.
- Phase 6 (was WASM plugin host): removed. Subsequent phases renumbered.
Test plan
- Read
docs/design.mdanddocs/roadmap.mdend to end for coherence. - Confirm the Starlark code samples in §3 and §4 of the design doc reflect the intended target/plugin shape.
- Confirm the Phase 1 exit criterion is the right forcing function for the next sprint.
🤖 Generated with Claude Code
Investigate, reproduce, or fix this item in an isolated repository. Each Flight preserves its outcome and agent session.
Start a Flight and preserve its objective, outcome, and session here.
No GitHub comments yet.