Rust client? #96
Replies: 1 comment 1 reply
-
I would like to. The way I see it working is through codegen. rspc will generate a Rust file (similar to the Typescript file it currently does) containing the client and then you can include it in your project. This is the same way Prisma Client Rust works and I think it's the best solution because it will allow us to have solid Rust analyzer integration as the API will use proper functions or modules instead of strings. This also heavily enforces the limitation that you can't call the rspc server from within the crate it was defined. Being able to support this usecase would be difficult and is something I don't see being supported for quite a while. Although from your description I don't think you will have a problem with this, it's just worth mentioning. As long as you have an I was thinking of the syntax being something like this but that is subject to change. The first step towards this would be Specta support for Rust. This should be on the easier side as the Specta type system is derived from Rust types so a lot of stuff should be one-to-one. I have been super busy but I am hoping to get a bit more work done on Specta over Christmas/early next year so hopefully, we could get this working. |
Beta Was this translation helpful? Give feedback.
-
Hi, I just stumbled upon rspc, and it looks really cool!
I'm working on a project that will have a GUI app via tauri as well as a standalone CLI that will control a separate daemon process via IPC. I'd prefer to implement the CLI in rust, so I've been looking for an RPC framework that can be easily invoked from either rust or typescript. Have you thought at all about adding a rust client for rspc? Or perhaps it already exists and I just didn't look closely enough :)
Beta Was this translation helpful? Give feedback.
All reactions