Open cole-h opened 2 years ago
Drafted because it's come up that this isn't the ideal solution (because rustup
may download binaries with different glibc versions, which may lead to weird breakage down the line).
I opened https://github.com/DeterminateSystems/riff/pull/200 as an alternative
after thinking about it, I think this might be a better solution since we already need cargo
for cargo metadata
We require users to have installed
cargo
(typically done viarustup
), which includesrustc
,cargo
, andrustfmt
by default.Fixes https://github.com/DeterminateSystems/riff/issues/147. Maybe fixes https://github.com/DeterminateSystems/riff/issues/126.
In order to test this PR, there are a few things you need to do (as a result of our remote registry):
nix build
will suffice, but you could also bootstrap with Riff itself andriff run cargo build
), or download one of the pre-compiled binaries from buildkite or GitHub Actions (aarch64-linux binaries available on request but they are not currently automated)rm ~/.cache/riff/registry.json
cargo metadata
to ensure cargo doesn't need to download any dependencies (because the next command will run allcargo
commands in offline mode)--offline
flag, e.g.:riff shell --offline
and verify thatrustc
,cargo
, andrustfmt
do not show up in the list of dependencies Riff added to the shellNote that, if at any point you use Riff without the
--offline
flag, you will need to repeat step 1 and remove the cached registry.