1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! SDK for building Barbacane WASM plugins.
//!
//! Provides `Request`, `Response`, and `Action` types, along with
//! `#[barbacane_middleware]` and `#[barbacane_dispatcher]` macros
//! that generate the required WASM export glue.
//!
//! # Example
//!
//! ```ignore
//! use barbacane_plugin_sdk::prelude::*;
//!
//! #[barbacane_middleware]
//! #[derive(serde::Deserialize)]
//! struct RateLimiter {
//! quota: u32,
//! window: u32,
//! }
//!
//! impl RateLimiter {
//! fn on_request(&mut self, req: Request) -> Action<Request> {
//! Action::Continue(req)
//! }
//!
//! fn on_response(&mut self, resp: Response) -> Response {
//! resp
//! }
//! }
//! ```
/// Re-export proc macros for plugin development.
pub use ;