I am developing a web application with actix-web framework. I have lots of other dependencies. cargo run outputs a binary about in size of ~170MB. When I change something and recompile the code, it took a long time on linking the libraries.
In order to avoid spending time on ld, I want to prelink all the libraries beforehand, just build my own crate without other dependencies linked, and dynamically link prelinked libraries and my crate at startup.
Here is my question, is it possible to do something similar to this, or do you have any other ideas about increasing compilation speed? I hope there is away to pass these linking steps.
@jschievink thanks for tip, whole compilation time decreased like 40% for a small change in code. What about prelinking the libraries? imo, It should be possible, however cargo's build structure may not allow it. Can some scripts do the job?
Update: nvm, I think linking time is so much shortened, that linking libraries beforehand does not worth.