wasmtime::component::bindgen!({
inline: "
package kernel:host;
/// Synthetic world that imports every frozen host package plus
/// the `astrid:guest/lifecycle` interface (for the
/// `capsule-result` type used by `astrid-hook-trigger`). One
/// world keeps the generated module deduplicated.
///
/// `astrid:io/poll` is the Astrid-owned readiness primitive
/// (replaces the historical wasi:io/poll dependency). Every
/// readiness operation goes through Astrid host code so it is
/// audited, principal-scoped, cancellable, and quota-bounded.
world kernel {
import astrid:io/error@1.0.0;
import astrid:io/poll@1.0.0;
import astrid:io/streams@1.0.0;
import astrid:fs/host@1.0.0;
import astrid:ipc/host@1.0.0;
import astrid:kv/host@1.0.0;
import astrid:net/host@1.0.0;
import astrid:http/host@1.0.0;
import astrid:sys/host@1.0.0;
import astrid:process/host@1.0.0;
import astrid:uplink/host@1.0.0;
import astrid:elicit/host@1.0.0;
import astrid:approval/host@1.0.0;
import astrid:identity/host@1.0.0;
import astrid:guest/lifecycle@1.0.0;
}
",
path: "wit-staging",
with: {
"astrid:io/poll@1.0.0.pollable": wasmtime_wasi::p2::DynPollable,
"astrid:io/error@1.0.0.error": wasmtime_wasi::p2::IoError,
"astrid:io/streams@1.0.0.input-stream": wasmtime_wasi::p2::DynInputStream,
"astrid:io/streams@1.0.0.output-stream": wasmtime_wasi::p2::DynOutputStream,
},
trappable_error_type: {
"astrid:io/streams.stream-error" => wasmtime_wasi::p2::StreamError,
},
imports: {
"astrid:io/streams": trappable,
"astrid:ipc/host.[method]subscription.recv": async,
"astrid:http/host.http-request": async,
"astrid:http/host.http-stream-start": async,
"astrid:http/host.[method]http-stream.read-chunk": async,
},
});