Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

registry: no default inputs for Rust #171

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cole-h
Copy link
Member

@cole-h cole-h commented Oct 12, 2022

We require users to have installed cargo (typically done via
rustup), which includes rustc, cargo, and rustfmt by default.


Fixes #147.
Maybe fixes #126.


In order to test this PR, there are a few things you need to do (as a result of our remote registry):

  1. Check out and build Riff from this branch (nix build will suffice, but you could also bootstrap with Riff itself and riff 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)
  2. Remove the cached registry by running rm ~/.cache/riff/registry.json
  3. Run cargo metadata to ensure cargo doesn't need to download any dependencies (because the next command will run all cargo commands in offline mode)
  4. Run Riff with the --offline flag, e.g.: riff shell --offline and verify that rustc, cargo, and rustfmt do not show up in the list of dependencies Riff added to the shell

Note that, if at any point you use Riff without the --offline flag, you will need to repeat step 1 and remove the cached registry.

We require users to have installed `cargo` (typically done via
`rustup`), which includes `rustc`, `cargo`, and `rustfmt` by default.

We could recommend `rustup` directly (e.g. instead of any distro
package) in order to easily support the `rust-toolchain.toml` file that
may or may not exist in any given project.
@cole-h cole-h force-pushed the cole/ds-285-use-rustup-based-rustc-and-cargo branch from 595b956 to 81d1243 Compare October 12, 2022 16:12
@cole-h cole-h marked this pull request as draft October 13, 2022 15:06
@cole-h
Copy link
Member Author

cole-h commented Oct 13, 2022

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).

@figsoda
Copy link
Contributor

figsoda commented Jan 11, 2023

I opened #200 as an alternative

@figsoda
Copy link
Contributor

figsoda commented Jan 20, 2023

after thinking about it, I think this might be a better solution since we already need cargo for cargo metadata

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants