Not a problem,how much time spent on waiting Martin compiling finished? #664
-
In my computer,it's always minutes...... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Rust in general tends to be far slower to compile than most other languages, see here for the in-depth reasoning. In general, incremental compilation should be relatively fast (i.e. if you only change Martin code itself, not any of the dependencies). In a way, this is a trade off between "i want to compile fast but crash at run time vs i want to spend more time compiling and catch more errors before I run my program"... I would prefer the later :) P.S. That said, we can always try to optimize compile time by removing any unused dependencies, or in some cases - if we only use a part of the dependent crate, to use |
Beta Was this translation helpful? Give feedback.
Rust in general tends to be far slower to compile than most other languages, see here for the in-depth reasoning. In general, incremental compilation should be relatively fast (i.e. if you only change Martin code itself, not any of the dependencies). In a way, this is a trade off between "i want to compile fast but crash at run time vs i want to spend more time compiling and catch more errors before I run my program"... I would prefer the later :)
P.S. That said, we can always try to optimize compile time by removing any unused dependencies, or in some cases - if we only use a part of the dependent crate, to use
features
of that crate to select just a part of the dependent crate to compile.