Expand description
The Rust Spin SDK.
This crate is the main entry point for building Spin
components in Rust. Each capability is exposed as a feature-gated
module. All features are enabled by default; disable default-features
and pick only what you need to slim down compile times.
The http_service and redis_subscriber attribute macros
generate the boilerplate required to expose a component to the
Spin runtime.
Re-exports§
pub use wasip3;pub use wasip3::wit_bindgen;
Modules§
- http
http - Incoming and outgoing HTTP requests.
- key_
value key-value - Persistent key-value storage.
- llm
llm - Large-language-model inference.
- mqtt
mqtt - MQTT message publishing.
- mysql
mysql - MySQL relational database storage.
- pg
pg - Postgres relational database storage.
- redis
redis - Redis storage and message publishing.
- sqlite
sqlite - SQLite database access.
- time
- Time-related functions.
- variables
variables - Application variable lookup.
Macros§
- dependencies
- This macro generates code from a Spin components dependencies using wit-bindgen. During expansion the
macro will check for existence of a
spin-dependencies.witin the developers project directory and if it is present (used to indicate the presence of dependencies in the manifest) will invoke wit-bindgen to generate the bindings.
Attribute Macros§
- http_
service - Marks an
async fnas an HTTP component entrypoint for Spin. - redis_
subscriber - The entrypoint to a Spin Redis component.