Conversation
|
The CI failure seems unrelated: |
|
I wasn't aware of more users of rustwide, cool! I totally forgot about this PR, generally don't hesitate to ping me if that happens again. On first sight I definitely see a security impact where the build of one crate could impact the build of the next crates by just replacing the toolchain binaries or parts of the cache. The risk I see is that unaware users of this library might enable this feature without knowing what they expose themselves to |
|
Since this PR is a little older: is this still something you need? @skius |
|
The project is on hiatus for now, but it does still depend on my changes. I agree with your concerns wrt security/reproducibility impact. Perhaps defining an override for the incremental compilation directory per crate and then only making that r/w is a better alternative? Assuming that either a) single subdirectories of a r/o docker mount can be made r/w or b) we can change the incremental directory to be outside the mount, either in a separate, per-crate r/w mount, or just inside the docker fs itself? Writing this out, for our purposes just using the ephemeral docker fs might be a good approach, since we're only interested in side-effects of incremental compilation, and are doing full builds anyway. I'd have to check if the incremental build directory can be set to something outside of |
We're running into issues with rustwide in qrates when incremental compilation is enabled:
This PR adds an option to
Commandto allow mounting the$CARGO_HOMEdirectory as read/write, which resolves our issue.I am unsure if this is the way to solve the issue, so I'm opening this PR in draft state. I would be happy as well if there was a way to set the incremental directory to something ephemeral inside the vfs and keeping
$CARGO_HOMEread-only. Our project is only interested in some side-effects of incremental compilation in rustc (computing HIR hashes), not the incremental nature itself.Thanks!