Learn how to install Wren locally to solve Exercism's exercises on your own machine
This track relies on Wren Console throughout to provide a local runtime for Wren. This means that we assume all execution of Wren on your computer will happen using Wren Console. Please don't get this confused with the official Wren CLI. In a perfect world you could use that runtime but it currently has several different issues making it a less than optimal choice for learning Wren with Exercism.
Wren Console is forked from Wren CLI, resolves these issues, and adds features to make your learning experience smoother. Don't worry, the Wren language knowledge and concepts you'll be learning here should apply wherever you wish to use Wren in the future.
git
commandwrenc
commandYou'll need the git
binary installed and in your path. This is how Wren Package installs packages (such as the test suite you'll need for testing your exercises, etc).
git
right out of the box.You can confirm Git is installed with git --version
:
$ git --version
git version 2.31.1
Don't worry if the exact version isn't a match, this isn't typically that critical.
You'll most likely want to download the latest release from GitHub. After that you'll need to unzip, and copy the wrenc
executable into your path.
It's also possible to build from source using Visual Studio.
You can download the latest release from GitHub or build from source.
wget -c https://github.com/joshgoebel/wren-console/releases/download/v0.3.1/wren-console-v0.3.1-linux.tar.gz
tar xzf wren-console-v0.3.1-linux.tar.gz
And make sure it's available in your PATH
.
cp bin/wrenc /usr/local/bin/
The easiest installation is using Exercism's Homebrew tap and formula:
brew tap exercism/wren
brew install wren-console
Alternatively you can download the latest release from Github and install it manually as shown in the Linux instructions. Building from source is also pretty simple if you're familiar with such things.
After your believe you've got the binary installed propery, it's good to test if everything is working.
Terminal
, cmd
, Powershell
, bash
, ...)wrenc -v
You should see both the wrenc
and Wren versions listed:
wrenc v0.3.1 (wren v0.4.0)
Note: It is important you open a new terminal window. Any open terminal windows might not have been refreshed after the installation completed. This means that the open terminals don't know that a new program was installed.
Help:
'wrenc' is not recognised
You likely haven't placed
wrenc
in your PATH... On MacOS and Linux you can alter yur path by adding the following to either~/.bash_profile
or~/.zshrc
:export PATH=/path/to/your/wrenc/:$PATH
No idea if any of this is correct. On Windows open the start menu and search for "environment variables". You'll need to edit the
PATH
entry and add the path to thewrenc
binaries here. Usually these are found atC:\Program Files\nodejs
. If you browse here with yourFile Explorer
, you should findnode.exe
,npm.bat
andnpx.bat
.Close any open terminals and open a new one.
Please follow these instructions to download exercism
CLI for your OS.
Once CLI is all setup & configured, download the first exercise - hello-world
:
$ exercism download --exercise=hello-world --track=wren
Each assignment then needs some Wren packages to run the tests. These can be installed by running this command within the assignment directory:
$ wrenc package.wren install