Mimimalist Multithreaded HTTP Web Server 510kb in Rust | Rust Language

  Рет қаралды 654

Learning Rust

Learning Rust

28 күн бұрын

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...

Пікірлер: 3
@monkey_see_monkey_do
@monkey_see_monkey_do 25 күн бұрын
Debug vs release executable size is mind blowing!
@amankansal5529
@amankansal5529 23 күн бұрын
A very good one but why you not using rocket? Is this just for having a understanding or what ??
@learning_rust
@learning_rust 23 күн бұрын
Yes, exactly !that. As I learn Rust I want to to learn as much about how to build things "from scratch" to get a better understanding 👍
Emacs: use-package essentials
35:45
Protesilaos Stavrou
Рет қаралды 3,8 М.
Iced vs Slint  | Rust GUI Wars #1
10:07
Creative Coders
Рет қаралды 4,3 М.
Они так быстро убрались!
01:00
Аришнев
Рет қаралды 2,4 МЛН
Coding a Web Server in 25 Lines - Computerphile
17:49
Computerphile
Рет қаралды 331 М.
Embedded Database | work in progress | Rust Language
17:07
Learning Rust
Рет қаралды 304
The Rust Standard Library is SO Confusing...Until Now!
11:45
Travis Media
Рет қаралды 26 М.
Hacking Windows TrustedInstaller (GOD MODE)
31:07
John Hammond
Рет қаралды 468 М.
Filter & Fold | Rust Language
22:44
Learning Rust
Рет қаралды 771
Stop, Intel’s Already Dead! - AMD Ryzen 9600X & 9700X Review
13:47
Linus Tech Tips
Рет қаралды 943 М.
Compiler-Driven Development in Rust
13:11
No Boilerplate
Рет қаралды 50 М.
Making Minimalist Web Server in C on Linux
10:23
Nir Lichtman
Рет қаралды 238 М.
The Worst Programming Language Ever - Mark Rendle - NDC Oslo 2021
1:00:41
NDC Conferences
Рет қаралды 1,3 МЛН