#cli #cargo #subcommand #language-server #rls

bin+lib cargo-rls-install

Rust Language Server easy install

23 stable releases

✓ Uses Rust 2018 edition

2.0.4 Mar 28, 2020
2.0.3 Feb 20, 2020
2.0.2 Dec 4, 2019
2.0.1 Nov 23, 2019
1.0.20 Mar 28, 2019

#48 in Cargo plugins

Download history 78/week @ 2020-03-16 125/week @ 2020-03-23 20/week @ 2020-03-30 121/week @ 2020-04-06 165/week @ 2020-04-13 6/week @ 2020-04-20 7/week @ 2020-04-27 11/week @ 2020-05-04 6/week @ 2020-05-11 23/week @ 2020-05-18 44/week @ 2020-05-25 113/week @ 2020-06-01 22/week @ 2020-06-08 45/week @ 2020-06-15 7/week @ 2020-06-22 52/week @ 2020-06-29

342 downloads per month

MIT license

39KB
874 lines

cargo-rls-install

Build Status Build status

Purpose

Rust Language Server easy install

Every night, I look for a day when I can use RLS which may be broken.
In order to realize it, this program goes to see the page that mexus's scripts updates everyday, and scrapes it.

If we had no mexus page in the first place, we would have never made Cargo subcommand,
nor did I feel like using Rust.

Installation

cargo install cargo-rls-install

Preparing for installation (Linux only)

For Linux, it is necessary to install OpenSSL for installation.

# Ubuntu or Debian
sudo apt install libssl-dev

# WSL(Windows Subsystem for Linux)
sudo apt install libssl-dev
sudo apt install build-essential
sudo apt install pkg-config

# RedHut
sudo yum install openssl-devel

# RedHut(Fedora etc.)
sudo dnf install openssl

Usage

cargo rls-install [FLAGS] [OPTIONS]

Example1

Three operations are executed by the above command.

  1. Rust Language(Nightly channel) install.
  2. RLS(Rust Language Server) install.
  3. Change default toolchain.

Before executing each operation, ask whether to execute it.

cargo rls-install -n # --nightly

Example2

All operations are done without approval until the end.

cargo rls-install -ny # --nightly --yes

Example3

Install Stable Rust, RLS and change the default toolchain.

cargo rls-install -s # --stable

Example4

Install Beta Rust, RLS and change the default toolchain.

cargo rls-install -b # --beta

Example5

Install RLS on all Rust channels.
The default toolchain is Nightly Rust, as the last operation on Nightly Rust is done.

cargo rls-install -ysbn

Example6(v1.0.17-)

Check the build status of Rust and RLS.
This command is intended for use alone.

cargo rls-install -v # --view

Example7(v1.0.23-)

Installs the specified component. Use rustup component add command.

# example: rustfmt
cargo rls-install -f # --rustfmt
cargo rls-install -c rustfmt # --component-add rustfmt

Example8(v1.0.25-)

Changes the selected Rust channel to the default toolchain.
If you specify cargo rls-instrall -d n, Nightly Rust with the most recent date will be specified as the default toolchain.

# Use stable
cargo rls-install -d s
# Use beta
cargo rls-install -d b
# Use target beta(v1.0.28-)
cargo rls-install -d beta-2019-05-19
# Use nightly
cargo rls-install -d nightly
# Use latest nightly rust toolchain
cargo rls-install -d n
# Use target nightly rust toolchain
cargo rls-install -d nightly-2019-05-21

Change default toolchain. Use rustup default command.

Example9(v1.0.28-)

Delete the selected Rust channel.

# Uninstall stable
cargo rls-install -u s
# Uninstall beta
cargo rls-install -u b
# Uninstall target beta
cargo rls-install -u beta-2019-05-19
# Uninstall nightly
cargo rls-install -u n
# Uninstall target nightly
cargo rls-install -u nightly-2019-5-21
# Uninstall all but the latest nightly rust dated
cargo rls-install -u a # a or all

Uninstall toolchain. Use rustup uninstall command.
Note: Latest nightly rust and default toolchain isn't eligible for uninstallation.

Example10(v2.0.4-)

Nightly Rust will be installed on the date you choose.

cargo rls-install -i nightly-2020-03-19

Flags

USAGE:
    cargo rls-install [FLAGS] [OPTIONS]

FLAGS:
    -b, --beta       Install beta channel Rust and RLS
    -h, --help       Prints help information
    -i, --install    Install user specified target nightly channel
    -n, --nightly    Install nightly channel Rust and RLS
    -f, --rustfmt    Install rustfmt
    -s, --stable     Install stable channel Rust and RLS
    -V, --version    Prints version information
    -v, --view       RLS build status view
    -y, --yes        Pre-approval: Install Rust, RLS and change toolchain

OPTIONS:
    -c, --component-add <component>          Wrapper(rustup component add)
    -d, --default-toolchain <default>        Wrapper(rustup default)
    -u, --uninstall-toolchain <uninstall>    Wrapper(rustup uninstall)

Special thanks

mexus

Dependencies

~6.5MB
~152K SLoC