This repository hosts four public crates: xfetch-plugin-api
(plugins), xfetch-extension-api (extensions),
xfetch-effect-api (effects), and xfetch-guest-api
(host calls for WebAssembly guests). The component protocol lives in
wit/xfetch-runtime.wit.
[dependencies]
serde = { version = "1", features = ["derive"] }
xfetch-plugin-api = { git = "https://github.com/xfetch-cli/api", package = "xfetch-plugin-api" }
xfetch-extension-api = { git = "https://github.com/xfetch-cli/api", package = "xfetch-extension-api" }
xfetch-effect-api = { git = "https://github.com/xfetch-cli/api", package = "xfetch-effect-api" }
During multi-repo development, you can use a standard Cargo
path dependency instead.
[dependencies]
serde = { version = "1", features = ["derive"] }
xfetch-plugin-api = { path = "../api/crates/plugin-api" }
xfetch-extension-api = { path = "../api/crates/extension-api" }
xfetch-effect-api = { path = "../api/crates/effect-api" }
Plugins, extensions and effects are standalone executables. The core writes
one JSON request to stdin, the program reads it, and writes one
JSON response to stdout.
The same contract applies to WebAssembly core modules
(wasm32-wasip1). Components export run from the
WIT world instead. See
WebAssembly Guests to build in Rust, Python,
Go or C, with manifest-based capabilities and sandbox limits.
- See Plugin SDK for the plugin API.
- See Extension SDK for the extension API.
- See Effect SDK for the effect API.
- See Protocol Reference for the wire formats.
- See Examples for minimal implementations.