Description
Checklist
- I've looked through the issues and pull requests for similar request
- This feature could be solved with a custom docker image (optional)
Describe your request
In #1225 it was suggested to make wsl2 integration and compilation faster by copying files to a linux fs and then back to windows for speedier compilation.
I found the problem. It consisted in the fact that the project uses files hosted in Windows, so the delays were due to the file system driver in WSL.
I assembled the project in WSL from a mounted section, for example "/mnt/c/Projects/my-project" - it was going to be like in "cross" for about 7 minutes. Then I copied the project and built it from the home directory, for example "~/my-project" - the build took about 40 seconds.
A wonderful article prompted me to this idea - https://markentier.tech/posts/2022/01/speedy-rust-builds-under-wsl2/I think the following steps need to be added for this project:
- copying the project folder to the virtual machine
- compilation
- copy back
For example, here is the CPU load with the command "cross build --target x86_64-unknown-linux-gnu" or "cargo build" from under the mounted disk: >20 minutes
And so from under the copied project: 1 minute, 34 seconds
Originally posted by @mars1211 in #1225 (comment)
Describe why this would be a good inclusion for cross
This would make compilation for file heavy crates better.