What is this?
This is the Rust SDK for building Astrid 'capsules' - sandboxed WASM modules that act as user-space processes in the Astrid OS model, with safe typed access to kernel services like filesystem, IPC, networking, storage, approval, and scheduling.
Is astrid-sdk a library or a code generator?
Both: astrid-sdk is the safe Rust library mirroring std's module layout (fs, net, process, env, time, log) plus Astrid-specific modules, while astrid-sdk-macros provides the #[capsule] proc macro that generates all the WASM ABI boilerplate for you.
How do I build a capsule with this SDK?
Depend on astrid-sdk (and serde) in your crate, annotate your implementation with the #[capsule] macro, then compile the crate to the wasm32-wasip2 target.
Do I need anything besides astrid-sdk itself?
Capsule authors only need to add astrid-sdk and serde as dependencies - the SDK handles JSON serialization across the WASM boundary, tool schema generation, and dispatch routing for you.
Should I call astrid-sys directly instead of astrid-sdk?
No - astrid-sys is just the raw WASM-to-host FFI syscall table and the README explicitly warns against using it directly; stick to the safe wrappers in astrid-sdk.
What exactly is a capsule?
A capsule is a sandboxed WASM module that behaves like a user-space process in the Astrid OS model, getting typed access to kernel services instead of raw syscalls.
Which kernel services can a capsule talk to?
Through dedicated SDK modules it can reach IPC, key-value storage, HTTP, hooks, cron scheduling, uplink, identity, approval, and general runtime services, alongside std-like fs, net, process, env, time, and log modules.
What does the #[capsule] macro save me from writing by hand?
It auto-generates the extern "C" WASM ABI exports, JSON serialization across the host boundary, tool schema generation, and dispatch routing, so you never touch astrid-sys directly.
What are similar projects?
just-bash, sdk-js, capsule-fs, moejs, WasmEdge, deno, wasmer, linera-protocol
Which topics is it in?
ffi, sandboxing, filesystem, key-value, cron, scheduler, runtime, webassembly, operating-system, plugin-system, wasm, http