I have, for a long time, wanted to stretch my functional type safe ways into other areas of programing, to better round out my skills. And I waffled between backend languages quite a bit. If you follow us on twitter, you likely remember questions about which language would you dive into? More Haskell ? Maybe something with JVM like Scala, or Elixir with the Phoenix framework? Possibly Rust? The goal here is to explore Rust in the realm of building API's with it, and see if it's something that I like, that I could be productive in? Rust also has a **lot** of traction in web assembly, and an all around pretty great community. So let's dive in.
The goal: can I get a server up and running with a simple endpoint that returns hello world, and better still, read params and get “Hello whatever” back?
Chose Rocket for quick up and running, paired with Diesel (from the developer that built active record!)
Seems like such a versatile language,
Stability and Tooling!! cargo is sweet and rustup makes install and project management pretty straight forward.
Questions around deployment ??
I like aws lambda, but I’m not feeling super confident of my backend JS without the warm blanket of a type system. Meow Notes’ backend is all JS, and as we refactor it into Elm, I can’t help but think, what runtime errors are lurking in the backend ?
With that, I don’t really want to be in the sysAdmin role. I want single command deployment, and don’t want to be responsible for the server up keep anymore. I don’t want to have to deal with proxy’s and configs. Blarf!
I’ve used docker in the past, and once it’s all set up, it’s pretty straight forward, easy peasy. IDK
Rocket’s design is centered around three core philosophies:
Made up of Route Attributes and Route Handlers