tomaka / rouille

Web framework in Rust
Apache License 2.0
1.09k stars 105 forks source link

Question on compile time #146

Closed mitranim closed 6 years ago

mitranim commented 6 years ago

Using cargo run, this code takes at least 2.2s to recompile:

extern crate rouille;

fn main() {
    rouille::start_server("localhost:6982", |_| rouille::Response::empty_404());
}

My CPU is a fairly recent 2.9 GHz i7, and I'm using the nightly toolchain. Usually, trivial Rust scripts recompile near-instantly due to dependency caching. Even using procedural macros (e.g. with Maud) doesn't seem to affect recompilation time. Using rouille, my compile time goes way up.

Any suggestions/advice? Is this a rouille-specific problem?

mitranim commented 6 years ago

A similar hello-world with Rocket takes at least 1.6s to compile. Seems typical. Maybe my previous programs just used simpler dependencies.