Skip to main content

Crate metaxy

Crate metaxy 

Source
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)
}

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.

Derive Macros§

Deserialize
Serialize