You can find the Introduction to web programming in Rust over here. Follow me on twitter to always get the latest information about web developmen...
For further actions, you may consider blocking this person and/or reporting abuse
Update:
Thank you so much for the update Chenyang!
thank you for your tutorial~ ^ ^
Thank you!
And if anyone can't compile tide like this
please see
hope this helps
Thanks for the article !
I'm looking into Zeit Now for Rust, but I have a few issues with it:
src/index.rs
innow.json
, but no such file exists, how does this work ?Thanks Francois! I changed the filename:
github.com/gruberb/web-programming...
You are right, serverless mindest is different than a typical cargo app. You can follow the official documentation here: zeit.co/blog/introducing-now-rust
As I mentioned in the article: You don't really create an app when thinking in serverless terms, but you just invoke functions/handlers which process data.
The ZEIT environment will idle your application when it's not needed and start it when triggered (an endpoint is called).
What I meant was that in a real-world case, your serverless endpoint/function will probably want to use business/domain/applicative code that is located and organised elsewhere, in Cargo workspaces, and Zeit's approach does not play well with that.
One way that could work would be to have a directory structure as follows:
Edit: after a quick test, this cannot work either, if the crates that the serverless endpoints depend on (here
foo
andbar
) are not published, which would be the case if they are internal to the project.Also, not having the
Cargo.toml
workspace root at the root of the project directory disables RLS, for code completion / formatting etc in VSCode.I guess this is what people mean when they talk about lock-in with serverless, it's not so much about the platform, but the constraints they impose upon your project structure and dependency management.
Hey man,
I have been interested in Rust for the last couple months - from the time that I've heard that a new Node.js framework called Deno is written in Rust. This last couple months I've been learning Rust through the official book (doc.rust-lang.org/book/) as well as through the examples and tutorials that I could find online.
Always had one goal in my mind - wanted to built the services and APIs with Rust that I've already built in Node.js in the past.
Anyway, I think you are doing an amazing work, sharing this tutorials and your mindset with other Rust (wannabe) developers - so thank you for that
Is Zeit a better choice than Lambda when it comes to rust? I haven't taken the time to look into many other options.
Zeit was just so easy to setup. I will look into AWS Lambda at some point in the next few weeks, but the hassle of setting everything up was not worth it to me (for now).
Now v2 uses AWS Lambdas under the hood, and provide abstractions and automation of a few things to make the process easier.
great article!
Thank you!