Рет қаралды 654
How to create the web server plus extra routes and compile down to an optimized binary in Rust. A nice follow on from the example in the Rust Book.
🟩 doc.rust-lang.org/book/ch20-0...
* I didn't use a thread pool btw *
#rustprogramming #learningrust
Latest Rust Version : Version 1.79.0 as of 12 July 2024
I've added html for default route - see GitHub repo :
----------------------------------------------------------------------------------
🟩 github.com/RGGH/wb/tree/main
Make the binary even smaller with UPX :
./upx --best --lzma ~/Documents/rust/wb/target/release/wb
File size Ratio Format Name
-------------------- ------ ----------- -----------
509736 - 189456 37.17% linux/amd64 wb
Just 189kb !
upx.github.io/
nnethercote.github.io/perf-bo...