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
58
59
60
61
62
63
64
65
66
//! Host function implementations for the wasmtime Component Model.
//!
//! Each submodule implements the corresponding `Host` trait from the
//! WIT-generated bindings on `HostState`. The trait implementations
//! are wired to the wasmtime linker via the shared
//! `engine::wasm::configure_kernel_linker` helper, which calls
//! `bindings::Kernel::add_to_linker` (the synthetic kernel world that
//! imports every host package).
/// Capsule-level approval requests.
pub
/// Elicit lifecycle API (install/upgrade user input collection).
pub
/// File system operations for plugins.
pub
/// HTTP network executions for plugins.
/// Identity operations (resolve, link, create user).
pub
/// Astrid-owned readiness multiplexing (`astrid:io/poll@1.0.0`).
///
/// Replaces the wasi:io/poll dependency. Every readiness operation is
/// audited, principal-scoped, races against the capsule cancellation
/// token, and is bounded by the per-principal quota profile.
pub
/// Inter-Process Communication bus.
pub
/// Key-Value persistent storage primitives.
pub
pub
/// Process spawning and sandboxing.
/// Sentinel `Pollable` / `InputStream` / `OutputStream` impls used as
/// no-panic placeholders by resource methods whose full implementation
/// is still pending (stream-half adapter + per-resource pollable
/// wiring planned in dedicated follow-up commits).
pub
/// System configuration primitives.
/// Uplink communications with host capabilities.
pub
/// Utility functions for WASM host implementations.
pub
// Host registration is handled by [`Kernel::add_to_linker`] in
// `engine/wasm/mod.rs`, which wires every per-domain `Host` /
// `HostResource` trait impl on `HostState` into the wasmtime `Linker`.
//
// The legacy `astrid:capsule/types` interface was split into per-domain
// type modules when the WIT was sharded (see `wit/host/`), so there is
// no longer a single empty `types::Host` trait to implement.
// `lifecycle` is the package providing `capsule-result` used by the
// guest's `astrid-hook-trigger` export. It defines only types — the
// generated `Host` trait is empty — but bindgen still emits the trait,
// so the kernel needs to assert it on `HostState` for the linker
// scaffolding to type-check.
// `astrid:io/poll` is implemented in `host/io.rs` — kernel-owned with
// audit + cancel-token + per-principal accounting. The wasi:io/poll
// forwarder used during the initial scaffolding pass has been removed:
// no wasi:* interface is exposed to capsules.