Incorporate Rust into t3 stack

Im wondering if there is a good way to incorporate rust into a t3 app? Want to experiment writing some apis in rust and hopefully seeing some performance boosts #blazinglyfast 🙂
9 Replies
cje
cje•2y ago
you could use a t3 backend as the backend-for-frontend of a rust backend but other than that not really
Christian Lind
Christian LindOP•2y ago
What does that mean cje? I was hoping that it would be possible to have a rust file somewhere in my repo, that can be run in vercel etc
cje
cje•2y ago
Vercel Documentation
Serverless Function Runtimes
Runtimes transform your source code into Serverless Functions, which are served by our Edge Network. Learn about the official runtimes supported by Vercel.
cje
cje•2y ago
but what problem are you trying to solve here? you could build a rust backend and have a next.js frontend talk to it what are you looking to get out of the t3 stack?
Christian Lind
Christian LindOP•2y ago
I want to have everything coexist in the same repo, ideally also have type-safety across typescript/t3 stack as well as in rust. For example by using my prisma.schema in rust
baddra
baddra•2y ago
I haven't really looked much into it but I think rspc may be a good fit for writting rust api's https://rspc.dev/
rspc
rspc
The best way to build typesafe APIs between Rust and Typescript.
Christian Lind
Christian LindOP•2y ago
Thanks a lot! Will check it out
Brendonovich
Brendonovich•2y ago
GitHub
GitHub - Brendonovich/prisma-client-rust: Type-safe database access...
Type-safe database access for Rust. Contribute to Brendonovich/prisma-client-rust development by creating an account on GitHub.
Brendonovich
Brendonovich•2y ago
PCR + rspc is your best bet for typesafety
Want results from more Discord servers?
Add your server