dependencies!() { /* proc-macro */ }Expand description
This macro generates code from a Spin components dependencies using wit-bindgen. During expansion the
macro will check for existence of a spin-dependencies.wit in 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.
ⓘ
use spin_sdk::http::{Request, IntoResponse};
use spin_sdk::http_service;
// Optionally generate dependencies if "spin-dependencies.wit" is present.
spin_sdk::dependencies!();
#[http_service]
async fn my_handler(request: Request) -> impl IntoResponse {
// Your logic goes here
}