Expand description
End-to-end typesafe RPC between Rust lambdas on Vercel and any TypeScript frontend.
This crate is a facade that re-exports the [metaxy-macro] proc macros together
with all runtime dependencies they need. Users only have to add two dependencies:
[dependencies]
metaxy = "0.1"
serde = { version = "1", features = ["derive"] }§Quick Start
ⓘ
use metaxy::rpc_query;
#[rpc_query]
async fn hello(name: String) -> String {
format!("Hello, {}!", name)
}Structs§
- Send
Error - Error returned when the streaming channel is closed.
- Stream
Sender - A typed sender for streaming RPC responses.
Traits§
- Deserialize
- A data structure that can be deserialized from any data format supported by Serde.
- Serialize
- A data structure that can be serialized into any data format supported by Serde.
Type Aliases§
- Headers
- HTTP header map for accessing request headers in RPC handlers.
Attribute Macros§
- rpc_
mutation - Generates a Vercel-compatible lambda handler from an async mutation function.
- rpc_
query - Generates a Vercel-compatible lambda handler from an async query function.
- rpc_
stream - Generates a Vercel-compatible streaming lambda handler from an async function.
Derive Macros§
- Deserialize
- Derive macro available if serde is built with
features = ["derive"]. - Serialize
- Derive macro available if serde is built with
features = ["derive"].