An interactive program to install & manage Rust toolchain and third-party tools, supports graphical user interface (GUI) and a basic commandline interface (CLI).
This program takes one configuration file toolset-manifest
, loads a list of tools from it,
then takes advantage of rustup
to install Rust toolchain, and uses various method to install different tools (*supporting vscode
, MSVC buildtools
, MinGW
etc, conditions and limitations applied, the details are in the Support section).
After installation, users will have a toolkit
, which is a combination of Rust toolchain and (maybe) a collection of tools if user choose to install it.
The toolkit
can be upgraded/downgraded as well. Which requires another configuration file,
called distribution-manifest
, this is typically stored in a server, telling the program what toolkit
is available to be installed.
The functions of this program are splitted into two parts: installer
and manager
, similar to rustup
's rustup-init
and rustup
.
installer
does the setup work, which initializes the local environment, that includes:- creating the installation root
- setup
CARGO_HOME
,RUSTUP_HOME
,RUSTUP_DIST_SERVER
,RUSTUP_UPDATE_ROOT
environment variables automatically. (Note if you already have these configured, those might get overrided).
After env setup, it will guide you through installing Rusttoolkit
.
manager
, well... it manages stuffs, such asupdating
anduninstalling
toolkit. (components managing
is on the way)
Unlike
rustup
, this program can be used to manage additional set of tools instead of the Rust toolchain. Additionally, this program installsrustup
by default, so you can continue usingrustup
with no problems.
-
Install Rust
If you only need the CLI binary, you don't need any dependencies other than
Rust
, so you can skip ahead. But If you need the GUI binary, you'll have to install additional packages such asNodeJS
. -
Install
NodeJs
-
Install
pnpm
, you can install by usingnpm
after installingNodeJS
using the following command:npm install -g pnpm@latest
-
(Linux Only) Install additional dev packages using:
bash ./ci/scripts/install-tauri-deps.sh
-
Debug
installer
mode:- Commandline interface
cargo dev run --cli --installer
- Graphical interface
pnpm dev run --installer
-
Debug
manager
mode:Running
manager
is not as straight forward as running inInstaller
mode. Becausemanager
binary need to be put alongside with some configuration files or such, otherwise it will panic. Luckily there's a helper command to help you creating a mocked environment, so you can testmanager
's functionalities easier.cargo dev run --manager
-
Before creating releases, you should know which edition to build for, the release editions can be found in
toolkit
configuration file, and the default edition isBasic
for testing purpose. If you need to release for other editions (such ascommunity
), specify it withEDITION
env arg just like:export EDITION='community'
-
If you need the offline package releases, you also need to vendor the packages used for offline installation, it can be done using:
cargo dev vendor --download-only
-
Then you can finally run the command to create released package(s) using specific command in the below table, and the result will be stored under
dist/
directory.Net Installer Net Installer & Offline Package CLI cargo dev dist -b --cli
cargo dev dist --cli
GUI cargo dev dist -b --gui
cargo dev dist --gui
Both cargo dev dist -b
cargo dev dist
Only
CLI
mode is listed, forGUI
usages, checkout this page for details.Currently, GUI mode only supports Chinese, the English support and its usage doc will be available soon.
Usage: rim-cli [OPTIONS]
Options:
-l, --lang <LANG> Specify another language to display [possible values: cn, en]
--prefix <PATH> Set another path to install Rust
--manifest <PATH or URL> Specify a path or url of manifest file that contains package source and various configurations
-h, --help Print help
-V, --version Print version
-
Set a default directory for installation:
./rim-cli --prefix path/to/dir
-
Install by loading a custom manifest (template:
toolset_manifest.toml
):./rim-cli --manifest path/to/your/toolset-manifest.toml
Manager mode will run after an installation record was detected, and it can also be overridden by having a
MODE
environment variable set tomanager
before running the program, such as runningexport MODE='manager'
in Unix systems.
Usage: MODE='manager' rim-cli.exe [OPTIONS] [COMMAND]
Commands:
update Update toolkit and/or this installation manager
uninstall Uninstall individual components or everything
try-it A subcommand to create a new Rust project template and let you start coding with it
help Print this message or the help of the given subcommand(s)
Options:
-l, --lang <LANG> Specify another language to display [possible values: cn, en]
-h, --help Print help
-V, --version Print version
- uninstall all:
./manager uninstall
- update self and toolkit:
./manager update
- update toolkit only:
./manager update --toolkit-only
- Export a pre-configured example project:
./manager try-it -p /path/to/create/project
This program support installing packages in various format, that you may put into a toolset-manifest
and pass an --manifest path/to/your/
when executing the CLI app to have an option to install them.
Currently, the following package formats are supported:
- Binaries - (with extension
.exe
on Windows, and no extension on Linux) - VS-Code plugins - (
.vsix
files) - *Compressed files - (with extension
.gz
,.xz
,.7z
,.zip
)
For compressed files, the program will first try to decompress it into a temporary path, then identify the structures within, which could boil down to this two kinds:
- Directory with
bin/
folder - Plain directory
Both will be placed under <InstallationRoot>/tools
folder, but if the directory has a bin/
folder, its path will be added to user's PATH
variable additionally.
-
There's a bug related to the WebKitGTK on some linux distro, which causing the GUI program showing blank upon starting. This issue can be bypassed after setting the environment variable
WEBKIT_DISABLE_COMPOSITING_MODE
to1
:export WEBKIT_DISABLE_COMPOSITING_MODE=1