feat(runtime): modularize host capabilities

- add an exact-version Capability Registry and structured descriptors
- move Clock bindings, host state, and Linker installation into its own module
- derive required capabilities from Component imports and link only requested interfaces
- cover exact-version resolution and minimal per-component capability sets
This commit is contained in:
Maofeng
2026-07-29 19:13:35 +08:00
parent 3f5bb344f7
commit 5b32886efe
7 changed files with 238 additions and 50 deletions
-9
View File
@@ -5,12 +5,3 @@ wasmtime::component::bindgen!({
path: "../../wit/service",
world: "service-component",
});
pub(crate) mod clock {
// Host capabilities are generated separately so adding a capability does
// not expand the baseline service contract for every component.
wasmtime::component::bindgen!({
path: "../../wit/clock",
world: "clock-host",
});
}