Skip to content

Latest commit

 

History

History
58 lines (47 loc) · 2.14 KB

File metadata and controls

58 lines (47 loc) · 2.14 KB

Getting Started

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.

Git Dependency

[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" }

Local Development

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" }

Runtime Model

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.

Next Step