3 ms·
If you were using `cargo run` or `cargo build` instead of `cargo check`, these 10 seconds could be spent in linking the final binary and not running the compile
by Fiahil 6y ago
If you were using `cargo run` or `cargo build` instead of `cargo check`, these 10 seconds could be spent in linking the final binary and not running the compiler frontend. for that matter 10 secs is not unheard of for large libraries with a lot of debug symbols.
That's why you should use `cargo check` instead : it will only run the rust compiler frontend, but not the LLVM linker.
- jfkebwjsbx 6y agoCargo check does not help with what the parent is talking about, which is a edit-compile-run loop.
- entha_saava 6y agoStatic checking is just a part of correctness verification (pretty large chunk but not enough). It can't catch many logic bugs, eg forgetting to update a variable's value. The type system can't help without non-straightforward techniques, and at that point it is diminishing returns. A powerful type system shouldn't be an excuse for not being able to iterate fast.