4 ms·
I highly recommend checking out makepad [1] - they have +100k of rust code and the compile time is around 10-15 seconds on commodity hardware. However they are
by matesz 3y ago
I highly recommend checking out makepad [1] - they have +100k of rust code and the compile time is around 10-15 seconds on commodity hardware.
However they are obsessed about performance. They reason for such speedy compile times is that makepad almost has no dependencies.
[1] https://github.com/makepad/makepad/ https://github.com/makepad/makepad/
- flohofwoe 3y agoIMHO Makepad also has an exceptionally readable Rust code style, which is a very rare thing (maybe that simple Rust style even contributes to the good build times, dunno) - but also: from the pov of a C programmer, 200 kloc in 10..15 seconds is still quite bad ;)
- timschmidt 3y agoHow quickly can you verify the memory safety of that C program in addition to compiling it though? When comparing like to like, C no longer looks so fast.
- gkbrk 3y agoRust code with unsafe still compiles slowly. And safe subsets of C still compile quickly.
- timschmidt 3y agoThat is exactly the opposite of my experience.
- deleted 3y ago[deleted]
- YetAnotherNick 3y agoI used actix web, could it be the reason for slow compile?
- matesz 3y agoI am not completely sure, but I think pretty much all frameworks in Rust have complex dependencies and codebase not optimized for fast compile times. You could check out Axum [1], at the first glance seems similar to actix [2]. Both use tokio which is by itself pretty big I think. Folks at makepad poured enormous effort in keeping dependency graph minimal. [1] https://github.com/tokio-rs/axum/ https://github.com/tokio-rs/axum/ [2] https://github.com/actix/actix-web/ https://github.com/actix/actix-web/