|
|
|
|
|
by nicoburns
4 days ago
|
|
> The C++ project doesn't depend on libc or any external libraries but that is not a practical option in rust. Aside from the std library (which you're not paying for in compile time because it's precompiled). Why is this different in Rust vs. C++? Sure, it's inconvenient not to use e.g. serde, but it's equally inconvenient in C++... Taffy (https://github.com/DioxusLabs/taffy) which is ~26k LoC + a handful of dependencies compiles in release mode in ~1.6s |
|
Doing `RUSTFLAGS="-C target-cpu=native" cargo install --path . --locked` on my project.
With lto=`thin` just takes 3.6 seconds on my pc which is very bad if you compare it to the c++ project.
Also the output binary is 1.3MB which is also supremely bad.