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
you could use a t3 backend as the backend-for-frontend of a rust backend
but other than that not really
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
theres a community runtime for rust https://vercel.com/docs/concepts/functions/serverless-functions/runtimes
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.
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?
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
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/
Thanks a lot! Will check it out
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.
PCR + rspc is your best bet for typesafety