I've switch to using asdf to manage my computers version of different programming environments. This is both a more unified approach to using both nvm and rbenv, since it handles a lot more programming languages, but the implementation is also faster.

Installing asdf

Go to the asdf getting started page to get the latest version:

1
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.8.0

Then add this to your ~/.bashrc:

1
. $HOME/.asdf/asdf.sh

Add a plugin

Different languages are supported using plugins, so first we need to install a plugin. For example:

1
asdf plugin add deno

Updating plugins

asdf itself has the code to manage the environment directories and keeping track of the packages. The plugins know all about a specific environment. So if you want to get the latest version of, say, deno, you need to update the plugin because that's where the build instructions live.

1
asdf plugin update --all

Installing a version

This will list all available versions for a specific environment:

1
asdf list all deno

We can install the latest with:

1
asdf install deno latest
∗ Downloading and installing deno...
Archive:  /home/wschenk/.asdf/installs/deno/1.8.1/bin/deno.zip
  inflating: /home/wschenk/.asdf/installs/deno/1.8.1/bin/deno  
The installation was successful!

We can install a specific version with:

1
asdf install deno 1.6.3
∗ Downloading and installing deno...
Archive:  /home/wschenk/.asdf/installs/deno/1.6.3/bin/deno.zip
  inflating: /home/wschenk/.asdf/installs/deno/1.6.3/bin/deno  
The installation was successful!

Selecting a version to use

There are 3 different scopes for usage:

globalwritten into ~/.tool-version, the default unless overridden
shellthe version that the current shell defaults to
localwritten into $PWD/.tool-version, overridden by directory

In our case, I'm going to do

1
asdf global deno 1.6.3

Then

1
deno --version
deno 1.6.3 (release, x86_64-unknown-linux-gnu)
v8 8.8.294
typescript 4.1.3

Conclusion

There seems to be a lot less shell overhead when using asdf vs rbenv and all the other ones, so I found that in practice it really sped up my system when running something that created a lot of subshells (./configure for example.)

Previously

Database Migrations what should I do when not using rails

2021-03-10

Next

Emacs Blog Writing and Navigation Mode emacs and hugo sitting in a tree

2021-03-15

howto

Previously

Database Migrations what should I do when not using rails

2021-03-10

Next

Emacs Blog Writing and Navigation Mode emacs and hugo sitting in a tree

2021-03-15