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

bin+lib cargo-rls-install

Rust Language Server easy install

21 stable releases

✓ Uses Rust 2018 edition

new 2.0.2 Dec 4, 2019
2.0.1 Nov 23, 2019
1.0.30 Sep 29, 2019
1.0.28 May 22, 2019
1.0.20 Mar 28, 2019

#32 in Cargo plugins

Download history 101/week @ 2019-08-21 78/week @ 2019-08-28 133/week @ 2019-09-04 38/week @ 2019-09-11 441/week @ 2019-09-18 81/week @ 2019-09-25 67/week @ 2019-10-02 6/week @ 2019-10-09 70/week @ 2019-10-16 45/week @ 2019-10-23 71/week @ 2019-10-30 29/week @ 2019-11-06 42/week @ 2019-11-13 99/week @ 2019-11-20 45/week @ 2019-11-27

359 downloads per month

MIT license

36KB
809 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

cargo rls-install -n # --nightly

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.

Example2

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

All operations are done without approval until the end.

Example3

cargo rls-install -s # --stable

Install Stable Rust and RLS and change the default toolchain.

Example4

cargo rls-install -b # --beta

Install Beta Rust and RLS and change the default toolchain.

Example5

cargo rls-install -ysbn

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

Example6(v1.0.17-)

cargo rls-install -v # --view

Check the build status of Rust and RLS. This command is intended to be used only by itself.

Example7(v1.0.23-)

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

Install component(example: rustfmt). Use rustup component add command.

Example8(v1.0.25-)

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

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

Flags

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

FLAGS:
    -b, --beta       Install beta channel Rust and RLS
    -h, --help       Prints help information
    -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 <comp_add>           Wrapper(rustup component add)
    -d, --default-toolchain <default>        Wrapper(rustup default)
    -u, --uninstall-toolchain <uninstall>    Wrapper(rustup uninstall)

Special thanks

mexus

Dependencies

~7MB
~160K SLoC