Crates.io | moonup |
lib.rs | moonup |
version | 0.1.3 |
source | src |
created_at | 2024-07-15 07:32:51.907802 |
updated_at | 2024-10-18 03:46:00.217813 |
description | Manage multiple MoonBit installations |
homepage | https://github.com/chawyehsu/moonup |
repository | https://github.com/chawyehsu/moonup |
max_upload_size | |
id | 1303548 |
size | 159,800 |
Manage multiple MoonBit installations
If you have the Rust toolchain installed, you can install moonup easily with Cargo:
cargo install moonup
If you are on Windows and you have Scoop installed:
scoop bucket add dorado https://github.com/chawyehsu/dorado
scoop install moonup
Or you may download the latest release from GitHub releases,
manually extract the archive and put the executables in a directory that is in your PATH
.
After installation, run moonup help
to see the available commands.
$ moonup help
Moonup is a tool to manage multiple MoonBit installations.
If you find any bugs or have a feature request, please open an issue on
GitHub: https://github.com/chawyehsu/moonup/issues
Usage: moonup [OPTIONS] <COMMAND>
Commands:
completions Generate shell completions
default Set the default toolchain
install Install or update a MoonBit toolchain [aliases: i]
pin Pin the MoonBit toolchain to a specific version
run Run a command with a specific toolchain
show Show installed and currently active toolchains
update Update MoonBit latest toolchain and moonup [aliases: u]
which Show the actual binary that will be run for a given command
help Print this message or the help of the given subcommand(s)
Options:
-v, --verbose... Increase logging verbosity
-q, --quiet... Decrease logging verbosity
-h, --help Print help
-V, --version Print version
With the setup-moonup action, It's super easy to use Moonup to set up a MoonBit environment in GitHub CI. Here is an example workflow:
- name: Setup MoonBit
uses: chawyehsu/setup-moonup@v1
run: moon version --all
Moonup allows you to install multiple MoonBit toolchains and switch between
them easily. All MoonBit toolchains (with the core standard library) are
installed in Moonup's toolchains
directory.
Moonup creates shim executables that replace the original MoonBit executables in the PATH. When you run a MoonBit command, the shim executable determines which MoonBit toolchain to use and proxies the command to the actual MoonBit executable in the desired toolchain.
With this approach, you can switch between MoonBit toolchains across projects easily without needing to change the PATH.
Moonup downloads MoonBit releases from chawyehsu/moonbit-binaries, which is powered by GitHub Actions and archives MoonBit releases continuously from the official website.
Prerequisites: Git, Rust
# clone the repo
git clone https://github.com/chawyehsu/moonup
cd moonup
# build
cargo build
# run and test
cargo run -- help
install
command to install multiple MoonBit toolchainspin
command to pin toolchain to a specific version in a projectdefault
command to set the default toolchainshow
command to show installed and currently active toolchainswhich
command to show the actual binary that will be run for a given commandrun
command to run a command with a specific toolchainupdate
command to self-update and update the toolchaincompletions
command to generate shell completionsmoonup © Chawye Hsu. Released under the Apache-2.0 license.
Blog · GitHub @chawyehsu · Twitter @chawyehsu