Crates.io | rspc |
lib.rs | rspc |
version | |
source | src |
created_at | 2022-07-03 13:35:58.492029 |
updated_at | 2024-12-03 15:11:40.594288 |
description | A blazing fast and easy to use TRPC server for Rust. |
homepage | |
repository | https://github.com/specta-rs/rspc |
max_upload_size | |
id | 618342 |
Cargo.toml error: | TOML parse error at line 23, column 1 | 23 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Website
You define a rspc
router and attach procedures to it like below. This will be very familiar if you have used trpc or GraphQL before.
let router = <rspc::Router>::new()
.query("version", |t| {
t(|ctx, input: ()| "0.0.1")
})
.mutation("helloWorld", |t| {
t(|ctx, input: ()| async { "Hello World!" })
});
This project is based off trpc and was inspired by the bridge system Jamie Pine designed for Spacedrive. A huge thanks to everyone who helped inspire this project!