Skip to content
/ rspc Public
forked from specta-rs/rspc

A blazingly fast and easy to use TRPC-like server for Rust.

License

Notifications You must be signed in to change notification settings

blarfoon/rspc

This branch is 97 commits ahead of, 413 commits behind specta-rs/rspc:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b1faea0 Â· Jan 3, 2023
Oct 17, 2022
Jan 1, 2023
Nov 30, 2022
Nov 16, 2022
Nov 9, 2022
Jan 3, 2023
Nov 30, 2022
Nov 9, 2022
Oct 17, 2022
Oct 8, 2022
Nov 30, 2022
Jun 23, 2022
Oct 17, 2022
Oct 17, 2022
Nov 16, 2022
Oct 1, 2022

Repository files navigation

Logo

rspc

🚧 Work in progress 🚧

A blazingly fast and easy to use TRPC-like server for Rust.

Website



Example

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!" })
    });

Features:

  • Per Request Context - Great for database connection & authentication data
  • Middleware - With support for context switching
  • Merging routers - Great for separating code between files

Inspiration

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!

About

A blazingly fast and easy to use TRPC-like server for Rust.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 73.3%
  • TypeScript 25.8%
  • Other 0.9%