4 ms·
I took an example of a server straight from the Rust async book, and to my surprise, it performed very well for a long time serving real internet requests till
by cft 6y ago
I took an example of a server straight from the Rust async book, and to my surprise, it performed very well for a long time serving real internet requests till I actually had to modify it:
https://rust-lang.github.io/async-book/01_getting_started/05_http_server_example.html https://rust-lang.github.io/async-book/01_getting_started/05...
My server processes JSON requests and returns JSON and also serves a couple of static files that I simply read with
include_bytes!("../files/index.html")
Once you understand Rust async model (which I recommend as a mental exercise for any programmer), it's all very simple.