You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey hey, I'm wondering if there is a recommended way to call an RSPC API from Rust? As far as I can tell there is no way to generate a client automatically. I saw some issues about OpenAPI but it doesn't seem to be released yet. I don't think using something like utoipa would work, there is no way to derive the necessary traits.
I suppose the best thing we could manage is to put the Rust types for the requests and responses (which derived specta::Type) into their own crate and then write our own client based on those. Or idk, something insane where we run compile the client into JS and then run it via Deno or something 😅
Any ideas would be appreciated!
The text was updated successfully, but these errors were encountered:
Right now we don't have an offcial way but I have started work on a prototype client for Rust previewed here (Note it's part of #326). I would be very open to contributions on it if you wanted to take it for a spin but be aware it's more a proof of concept at the moment as I wanted to iron out how the type exporter would work before we stablise the new API.
OpenAPI support is definitely a bit furthur away as it's much harder to integrate with.
(going to keep this issue open until it's stable so we have a place to track it's progress)
Hey hey, I'm wondering if there is a recommended way to call an RSPC API from Rust? As far as I can tell there is no way to generate a client automatically. I saw some issues about OpenAPI but it doesn't seem to be released yet. I don't think using something like utoipa would work, there is no way to derive the necessary traits.
I suppose the best thing we could manage is to put the Rust types for the requests and responses (which derived
specta::Type
) into their own crate and then write our own client based on those. Or idk, something insane where we run compile the client into JS and then run it via Deno or something 😅Any ideas would be appreciated!
The text was updated successfully, but these errors were encountered: