When building, the user's ~/.cargo is mounted into the container to allow cache sharing with the host. This can cause problems if the user's Cargo configuration file at ~/.cargo/config.toml contains directives which work on the host machine but not in the build container.
A specific example:
When building Proton, I had to remove the following lines from my Cargo configuration. The mold linker is installed on my host, so this always works for me, but it failed the Rust builds inside the proton container since mold is not present.
When building, the user's
~/.cargois mounted into the container to allow cache sharing with the host. This can cause problems if the user's Cargo configuration file at~/.cargo/config.tomlcontains directives which work on the host machine but not in the build container.A specific example:
When building Proton, I had to remove the following lines from my Cargo configuration. The mold linker is installed on my host, so this always works for me, but it failed the Rust builds inside the proton container since mold is not present.