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.