title | section |
---|---|
Ubuntu Setup |
setup |
Depending on your user privileges, you may have to precede some of the
commands in the steps below with sudo
.
To get started with b9 using the Ninja build system, you'll need the following:
git
build-essential
nodejs
(Minimum version 4.5.0)npm
cmake
(Minimum version 3.2.0)ninja
You can install the packages above using the following command:
apt-get update && apt-get install git build-essential nodejs npm cmake
git clone --recursive https://github.com/b9org/b9.git
If you are running Ubuntu 16.04 and older, your nodejs may be older than version 4.5, in which case you will need to upgrade it. You can install newer nodejs binaries from NodeSource's PPA using:
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - \
&& sudo apt-get install -y nodejs
Check out this guide for more information on obtaining node.js packages.
You may run nodejs -v
to verify that your nodejs version is 4.5.0 or above.
cd b9 \
&& npm install esprima
mkdir build \
&& cd build \
&& cmake -GNinja -DCMAKE_BUILD_TYPE=Debug .. \
&& ninja
Ensure you're in the build directory and run:
./b9run/b9run ./test/hello.b9mod
You can run the full b9 test suite with:
ninja test