DEV Community

Discussion on: What are your biggest obstacles/questions for moving from NodeJS to Rust?

Collapse
 
yann_yinn profile image
Yann • Edited

When i gave it a try ( github.com/yann-yinn/rust_graphql_... ), the first question was "which webserver to use", and Rocket was the one that was the easier to grasp. But for now Rocket works only with unstable Rust, which is a little bit scary ^^' ... And once you tasted Rocket, it is hard to use another one, so i was mainly waiting for Rocket to work with Stable Rust

Collapse
 
gklijs profile image
Gerard Klijs

Some things are waiting to get async to stable before getting there. I would use something that is not stable for a customer.
I have a GraphQL endpoint I would like to do in Rust, but subscriptions are still not supported in juniper.

Collapse
 
softprops profile image
Doug Tangren

You might find that's the wrong starter question to be asking as times change. Keeping serverless approaches to graphql applications in mind, you may want to first consider asking "do I even need a webserver?"

Once you have a firm belief you actually do need a server then ask the question "which one?"

Collapse
 
yann_yinn profile image
Yann • Edited

What serverless solution would you advise to create a GraphQL API with Rust ?

Thread Thread
 
softprops profile image
Doug Tangren

I might take a look at aws.amazon.com/appsync/ which allows you to bind resolvers directly to your data sources or if needed a lambda. If you are coming from nodejs, you might be familiar with serverless framework. There is a serverless plugin that makes it possible to deploy lambdas written in rust - github.com/softprops/serverless-rust

Thread Thread
 
yann_yinn profile image
Yann

Fun stuff, will sure take a look at the rust plugin. Did you tried it yourself ?

Thread Thread
 
softprops profile image
Doug Tangren

I maintain it :)