1#![deny(missing_docs)]
13#![cfg_attr(docsrs, feature(doc_cfg))]
14
15pub use spin_macro::{dependencies, http_service, redis_subscriber};
17
18#[cfg(feature = "http")]
20#[cfg_attr(docsrs, doc(cfg(feature = "http")))]
21pub mod http;
22
23#[cfg(feature = "key-value")]
25#[cfg_attr(docsrs, doc(cfg(feature = "key-value")))]
26pub mod key_value;
27
28#[cfg(feature = "llm")]
30#[cfg_attr(docsrs, doc(cfg(feature = "llm")))]
31pub mod llm;
32
33#[cfg(feature = "mqtt")]
35#[cfg_attr(docsrs, doc(cfg(feature = "mqtt")))]
36pub mod mqtt;
37
38#[cfg(feature = "mysql")]
40#[cfg_attr(docsrs, doc(cfg(feature = "mysql")))]
41pub mod mysql;
42
43#[cfg(feature = "pg")]
45#[cfg_attr(docsrs, doc(cfg(feature = "pg")))]
46pub mod pg;
47
48#[cfg(feature = "redis")]
50#[cfg_attr(docsrs, doc(cfg(feature = "redis")))]
51pub mod redis;
52
53#[cfg(feature = "sqlite")]
55#[cfg_attr(docsrs, doc(cfg(feature = "sqlite")))]
56pub mod sqlite;
57
58pub mod time;
60
61#[cfg(feature = "variables")]
63#[cfg_attr(docsrs, doc(cfg(feature = "variables")))]
64pub mod variables;
65
66#[unsafe(export_name = concat!("spin-sdk-version-", env!("SDK_VERSION")))]
68extern "C" fn __spin_sdk_version() {}
69
70#[cfg(feature = "export-sdk-language")]
72#[unsafe(export_name = "spin-sdk-language-rust")]
73extern "C" fn __spin_sdk_language() {}
74
75#[unsafe(export_name = concat!("spin-sdk-commit-", env!("SDK_COMMIT")))]
77extern "C" fn __spin_sdk_hash() {}
78
79pub use wasip3::{self, wit_bindgen};
80
81#[doc(hidden)]
82pub mod experimental {
83 #![allow(missing_docs)]
84 use crate::wit_bindgen;
85
86 wit_bindgen::generate!({
87 runtime_path: "crate::wit_bindgen::rt",
88 world: "spin-sdk-experimental",
89 path: "wit",
90 generate_all,
91 });
92}
93
94#[cfg(test)]
95mod test;