The compilation take a lot of time due to build.rs script from a cargo-prosa package.
This is visible through cargo build --timings

The time, come from a sub package generated by the build.rs script to generate configuration files.
It need to be done in another way to gain time.
One thing that could be done, is to do a macro to generate the configuration file.