Git Product home page Git Product logo

rsvm's Introduction

rsvm

A version manager for rust.

Installation

curl -L https://raw.github.com/sdepold/rsvm/master/install.sh | bash

or

wget -qO- https://raw.github.com/sdepold/rsvm/master/install.sh | bash

for fish-shell users

ln -s ~/.rsvm/rsvm.fish ~/.config/fish/functions

or

echo "source ~/.rsvm/rsvm.fish" >> ~/.config/fish/config.fish

Usage

Show the help messages. Choose the one that you like most.

rsvm help
rsvm --help
rsvm -h

Download and install a <version>. <version> could be for example "0.12.0".

rsvm install <version>
e.g.: rsvm install 0.12.0

Activate <version> for now and the future.

rsvm use <version>
e.g. rsvm use 0.12.0

List all installed versions of rust. Choose the one that you like most.

rsvm ls
rsvm list

List all versions of rust that are available for installation.

rsvm ls-remote

Print a channel version of rust that is available for installation.

rsvm ls-channel stable

Example: Install 0.12.0

curl https://raw.github.com/sdepold/rsvm/master/install.sh | bash
source ~/.rsvm/rsvm.sh
rsvm install 0.12.0
rsvm use 0.12.0

# you will now be able to access the rust binaries:
~ ∴ rustc -v
rustc 0.12.0
host: x86_64-apple-darwin

~ ∴ cargo -h
Usage: cargo <cmd> [options] [args..]

~ ∴ rustdoc -h
Usage: rustdoc [options] <cratefile>

Running the tests

RSVM is tested with bats. Install like this:

git clone https://github.com/sstephenson/bats.git
cd bats
./install.sh /usr/local

Inside the rsvm repository do this:

bats test/rsvm.sh.bats

License

Hereby placed under MIT license.

rsvm's People

Contributors

007lva avatar bhundven avatar d3m3vilurr avatar dbykov avatar dweinstein avatar mcandre avatar michaelmior avatar novando avatar rookwood101 avatar sdepold avatar spalger avatar t-k avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

rsvm's Issues

Feature request: Support for cygwin

I can install and run rsvm in Git Bash, a cygwin Unix-like environment for Windows. However, when I try to use rsvm to install Rust or list Rust versions, I get an error about lack of support:

$ rsvm ls-remote
rsvm: Not support this platform, MINGW64_NT-10.0

Could we land cygwin support in rsvm, for Windows users keen on managing multiple installed Rust versions?

Unable to use installed version with fresh install of RSVM.

Hi,

After installing rsvm and rust 1.9, I find myself unable to use it.

> rsvm use 1.9
Activating rust 1.9 ... rsvm_use:source:8: not enough arguments
done
> rustc
zsh: command not found: rustc

Infos:

> rsvm --version
v0.5.0
> which rsvm 
rsvm () {
 ... etc ...
}

I'm using ZSH in Linux, and I think the error comes from line 130 of rsvm.sh. It reads: source $RSVM_SCRIPT. But at that point, I don't think $RSVM_SCRIPT is defined, because it was set to ${BASH_SOURCE[0]} which is not defined in my shell by the time rsvm.sh gets sourced.

If I replace line 13 of rsvm.sh (The one reading RSVM_SCRIPT=${BASH_SOURCE[0]}) by RSVM_SCRIPT=${(%):-%N} (ZSH's rough equivalent), then it starts to work the next time rsvm.sh is sourced.

Detect something like .rsvmrc

Is there a way to load specific Rust version automatically?
If there is no way to do that, how about adding .rsvmrc and automatically detect it when cd(or popd, pushd, ...) occurs?
As far as I know, version manager like nvm does so.

error when performing uninstall on Darwin

$ rsvm uninstall nightly.20150828151316
uninstall nightly.20150828151316 ...
rm: illegal option -- I
usage: rm [-f | -i] [-dPRrvW] file ...
       unlink file

in rsvm.sh uninstall handler specifically rm -rI "$RSVM_DIR/$1" the option -I is not available on the built-in rm (it is on GNU rm)

I have a PR incoming for this for your review.

bad URL

  • Wrong URL => "sdepold.github.com/rsvm"
  • Correct URL => "sdepold.github.io/rsvm"

install: WARNING: failed to run ldconfig

user@linux-pc $ rsvm install 1.5.0 --verbose
Creating the respective folders for rust 1.5.0 ... done
Sources for rust 1.5.0 already downloaded ...
Sources for rust 1.5.0 already extracted ...
install: uninstalling component 'rustc'
install: uninstalling component 'rust-std-x86_64-unknown-linux-gnu'
install: uninstalling component 'rust-docs'
install: uninstalling component 'cargo'
install: creating uninstall script at /home/user/.rsvm/1.5.0/dist/lib/rustlib/uninstall.sh
install: installing component 'rustc'
install: installing component 'rust-std-x86_64-unknown-linux-gnu'
install: installing component 'rust-docs'
install: installing component 'cargo'
install: WARNING: failed to run ldconfig. this may happen when not installing as root. run with --verbose to see the error

    Rust is ready to roll.


And we are done. Have fun using rust 1.5.0.

user@linux-pc $ rustc
rustc: command not found

It doesnt looks like verbose adds verbosity. Is it important error or i can ignore it?

error: toolchain 'nightly-x86_64-unknown-linux-gnu' is not installed

installation went fine, but when I type rustc --version
error: toolchain 'nightly-x86_64-unknown-linux-gnu' is not installed info: caused by: not a directory: '/home/roberto/.rsvm/current/rustup/toolchains/nightly-x86_64-unknown-linux-gnu'
and when can't install via rustup cause I can't have no version installed with rsvm - how to uninstall rsvm?

Invalid RUST_SRC_PATH

Installed rust 1.6.0 via rsvm install 1.6.0 and activated it via rsvm use 1.6.0.

$RUST_SRC_PATH points to $HOME/.rsvm/current/src/rustc-source/src but rustc-source is missing inside of $HOME/.rsvm/current/src/.

rsvm ls fails to show 1.16.0

When Rust version 1.16.0 is installed via rsvm install 1.16.0, rsvm ls continues to complain that there are "no" installed versions.

racer RUST_SRC_PATH

Hello

I am trying to use racer with a version of rust installed with rsvm (1.5.0).
However, I'm somehow failing to point racer to the right rust src path.
I have tried setting RUST_SRC_PATH to /home/myuser/.rsvm/current/src but that results in:

$ racer complete std::io::B
Unable to find libstd under RUST_SRC_PATH. N.B. RUST_SRC_PATH variable needs to point to the *src* directory inside a rust checkout e.g. "/home/foouser/src/rust/src". Current value "/home/myuser/.rsvm/current/src"

It is true that the /home/myuser/.rsvm/current/src doesn't have the same content as rust/src, but I couldn't find any other src directory.

Could you please point me to where I should point racer?
I am using bash on ubuntu 14.04 if that has any relevance.

Thank you!

Silent failures when using symver names like Rust 1.16

When attempting to install Rust 1.16.0, via rsvm install 1.16, rsvm appears to be able to install, but not activate, this version of Rust. After this install command, rsvm ls continues to show "no" installed versions.

Host: macOS 10.12.3 Sierra, rsvm 0.5.1.

Install script misrecognize bash as zshell

Hi!

First of all, thx for the version manager! It's really cool!
I had only one little problem: When I tried to install rsvm from my bash terminal with the provided command in the readme with curl and install.sh, somehow the installer created a .zshrc in my home directory and obviously, when i tried to use rsvm after restarting my terminal, bash didn't found it.

I'm on Linux Mint 17.3 Cinnamon 64bit, with close to stock bash and i have .bashrc in my home dir as well.

Weird behavior from rsvm help "File name too long"

$ rsvm help

mkdir:
/Users/justin.collum/.rsvm

total 44
drwxr-xr-x  12 justin.collum  NWEA\Domain Users   384B Dec 22 15:30 .git/
-rw-r--r--   1 justin.collum  NWEA\Domain Users    39B Dec 22 15:30 .gitignore
-rw-r--r--   1 justin.collum  NWEA\Domain Users   249B Dec 22 15:30 .travis.yml
-rw-r--r--   1 justin.collum  NWEA\Domain Users   931B Dec 22 15:30 CHANGELOG.md
-rw-r--r--   1 justin.collum  NWEA\Domain Users   1.0K Dec 22 15:30 LICENSE
-rw-r--r--   1 justin.collum  NWEA\Domain Users   1.7K Dec 22 15:30 README.md
drwxr-xr-x   3 justin.collum  NWEA\Domain Users    96B Dec 22 15:30 cache/
-rwxr-xr-x   1 justin.collum  NWEA\Domain Users   1.3K Dec 22 15:30 install.sh
-rw-r--r--   1 justin.collum  NWEA\Domain Users   2.4K Dec 22 15:30 rsvm.fish
-rw-r--r--   1 justin.collum  NWEA\Domain Users    15K Dec 22 15:30 rsvm.sh
drwxr-xr-x   3 justin.collum  NWEA\Domain Users    96B Dec 22 15:30 test/
/Users/justin.collum/.rsvm/versions: File name too long
touch:
/Users/justin.collum/.rsvm

total 44
drwxr-xr-x  12 justin.collum  NWEA\Domain Users   384B Dec 22 15:30 .git/
-rw-r--r--   1 justin.collum  NWEA\Domain Users    39B Dec 22 15:30 .gitignore
-rw-r--r--   1 justin.collum  NWEA\Domain Users   249B Dec 22 15:30 .travis.yml
-rw-r--r--   1 justin.collum  NWEA\Domain Users   931B Dec 22 15:30 CHANGELOG.md
-rw-r--r--   1 justin.collum  NWEA\Domain Users   1.0K Dec 22 15:30 LICENSE
-rw-r--r--   1 justin.collum  NWEA\Domain Users   1.7K Dec 22 15:30 README.md
drwxr-xr-x   3 justin.collum  NWEA\Domain Users    96B Dec 22 15:30 cache/
-rwxr-xr-x   1 justin.collum  NWEA\Domain Users   1.3K Dec 22 15:30 install.sh
-rw-r--r--   1 justin.collum  NWEA\Domain Users   2.4K Dec 22 15:30 rsvm.fish
-rw-r--r--   1 justin.collum  NWEA\Domain Users    15K Dec 22 15:30 rsvm.sh
drwxr-xr-x   3 justin.collum  NWEA\Domain Users    96B Dec 22 15:30 test/
/Users/justin.collum/.rsvm/.rsvm_version: File name too long
cat:
/Users/justin.collum/.rsvm

total 44
drwxr-xr-x  12 justin.collum  NWEA\Domain Users   384B Dec 22 15:30 .git/
-rw-r--r--   1 justin.collum  NWEA\Domain Users    39B Dec 22 15:30 .gitignore
-rw-r--r--   1 justin.collum  NWEA\Domain Users   249B Dec 22 15:30 .travis.yml
-rw-r--r--   1 justin.collum  NWEA\Domain Users   931B Dec 22 15:30 CHANGELOG.md
-rw-r--r--   1 justin.collum  NWEA\Domain Users   1.0K Dec 22 15:30 LICENSE
-rw-r--r--   1 justin.collum  NWEA\Domain Users   1.7K Dec 22 15:30 README.md
drwxr-xr-x   3 justin.collum  NWEA\Domain Users    96B Dec 22 15:30 cache/
-rwxr-xr-x   1 justin.collum  NWEA\Domain Users   1.3K Dec 22 15:30 install.sh
-rw-r--r--   1 justin.collum  NWEA\Domain Users   2.4K Dec 22 15:30 rsvm.fish
-rw-r--r--   1 justin.collum  NWEA\Domain Users    15K Dec 22 15:30 rsvm.sh
drwxr-xr-x   3 justin.collum  NWEA\Domain Users    96B Dec 22 15:30 test/
/Users/justin.collum/.rsvm/.rsvm_version: File name too long
find:
/Users/justin.collum/.rsvm

total 44
drwxr-xr-x  12 justin.collum  NWEA\Domain Users   384B Dec 22 15:30 .git/
-rw-r--r--   1 justin.collum  NWEA\Domain Users    39B Dec 22 15:30 .gitignore
-rw-r--r--   1 justin.collum  NWEA\Domain Users   249B Dec 22 15:30 .travis.yml
-rw-r--r--   1 justin.collum  NWEA\Domain Users   931B Dec 22 15:30 CHANGELOG.md
-rw-r--r--   1 justin.collum  NWEA\Domain Users   1.0K Dec 22 15:30 LICENSE
-rw-r--r--   1 justin.collum  NWEA\Domain Users   1.7K Dec 22 15:30 README.md
drwxr-xr-x   3 justin.collum  NWEA\Domain Users    96B Dec 22 15:30 cache/
-rwxr-xr-x   1 justin.collum  NWEA\Domain Users   1.3K Dec 22 15:30 install.sh
-rw-r--r--   1 justin.collum  NWEA\Domain Users   2.4K Dec 22 15:30 rsvm.fish
-rw-r--r--   1 justin.collum  NWEA\Domain Users    15K Dec 22 15:30 rsvm.sh
drwxr-xr-x   3 justin.collum  NWEA\Domain Users    96B Dec 22 15:30 test/
/Users/justin.collum/.rsvm: File name too long
mkdir:
/Users/justin.collum/.rsvm

total 44
drwxr-xr-x  12 justin.collum  NWEA\Domain Users   384B Dec 22 15:30 .git/
-rw-r--r--   1 justin.collum  NWEA\Domain Users    39B Dec 22 15:30 .gitignore
-rw-r--r--   1 justin.collum  NWEA\Domain Users   249B Dec 22 15:30 .travis.yml
-rw-r--r--   1 justin.collum  NWEA\Domain Users   931B Dec 22 15:30 CHANGELOG.md
-rw-r--r--   1 justin.collum  NWEA\Domain Users   1.0K Dec 22 15:30 LICENSE
-rw-r--r--   1 justin.collum  NWEA\Domain Users   1.7K Dec 22 15:30 README.md
drwxr-xr-x   3 justin.collum  NWEA\Domain Users    96B Dec 22 15:30 cache/
-rwxr-xr-x   1 justin.collum  NWEA\Domain Users   1.3K Dec 22 15:30 install.sh
-rw-r--r--   1 justin.collum  NWEA\Domain Users   2.4K Dec 22 15:30 rsvm.fish
-rw-r--r--   1 justin.collum  NWEA\Domain Users    15K Dec 22 15:30 rsvm.sh
drwxr-xr-x   3 justin.collum  NWEA\Domain Users    96B Dec 22 15:30 test/
/Users/justin.collum/.rsvm/versions: File name too long

I think this is an alias issue. But I used unalias to get rid of some aliases

unalias ll
unalias ls
unalias cd

still happening. Suggestions?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.