Skip to content

Latest commit

 

History

History
61 lines (50 loc) · 2.36 KB

getting-started.md

File metadata and controls

61 lines (50 loc) · 2.36 KB

Getting Started

This repository hosts five public crates: xfetch-api-common (shared protocol/IO/timeout primitives), 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. The current release line is 0.3.1.

Git Dependency

[dependencies]
serde = { version = "1", features = ["derive"] }
xfetch-plugin-api = { git = "https://github.com/xfetch-cli/api", package = "xfetch-plugin-api" }
xfetch-api-common = { git = "https://github.com/xfetch-cli/api", package = "xfetch-api-common" }
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