Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ZKVM-484: revamp
rzup
cli (risc0#1961)
This PR is a Rust revamp of the original `rzup` bash scripts. The goal of this revamp is to have `rzup` act similarly to `rusutp` for toolchain management, and to eventually supersede `cargo risczero install` and `cargo risczero build-toolchain`. The features and necessary requirements are likely to change with suggestions and updates. Below is running list the progress. To try it out: `cargo run --bin rzup` shows the info previewed below. To install the sane defaults (rust, cpp, cargo-risczero): `rzup install` To install specifics: - cargo-risczero: `rzup extension install cargo-risczero` or `rzup install cargo-risczero` - rust: `rzup toolchain install rust` or `rzup install rust` - cpp: `rzup toolchain install cpp` or `rzup install cpp` To check for updates of cargo-risczero and the active toolchains: `rzup check` To show all installed things and meta: `rzup show` To set new defaults (i.e. active) toolchains: `rzup default rust <TOOLCHAIN_NAME>`, `rzup default cpp <TOOLCHAIN_NAME>` To use different cargo-risczero versions (and zkVM): `rzup extension use cargo-risczero <VERSION>` Each of these have more subcommands that you can see with `--help`. Todo: - [x] quick start install `rzup install` (latest rust toolchain, cpp, & cargo risczero) - [x] cargo-risczero: extension installation / checking / updating - [x] List installed toolchains - [x] Install specific toolchains (cpp/rust) - [x] Build rust toolchain - [x] Show toolchain / extension / rzup info* - [x] rust toolchain update checks - [x] cargo risczero update check - [x] pretty print - [x] c++ toolchain update check - [x] Self (rzup) ~~check~~, update, etc - [x] Set default toolchain + `settings.toml` persistence (?) - [x] `rzup-init.sh` script for detecting the target and downloading correct `rzup` - [x] Github token support to avoid throttling - [x] true verbosity - [x] help/discussion coverage - [x] Improve error handling Preview: ``` rzup 0.2.1 ██████ █▀▀▀██ ██████ █ ▄▀ █ Prove anything. ██████ ██▄▄▄█ Verify everywhere. ██████ ██████ RISC ██████ ZERO Contribute : https://github.com/risc0/ Documentation : https://dev.risczero.com/ Chat & Support : https://discord.com/invite/risczero/ Usage: rzup [OPTIONS] [COMMAND] Commands: show Show the active and installed toolchains and extensions install Install toolchains or extensions update Update toolchains or extensions check Check for updates to toolchains and extensions default Set the default toolchains toolchain Modify or query the installed toolchains extension Modify or query the installed extensions help Print this message or the help of the given subcommand(s) Options: -v, --verbose Enable verbose output -h, --help Print help -V, --version Print version Discussion: rzup installs RISC Zero toolchains and extensions from the official release channels, enabling you to easily switch between different versions and keep them updated. If you are new to RISC Zero, consider visitng our documentation to learn more. ``` --------- Co-authored-by: Erik Kaneda <[email protected]>
- Loading branch information