Installation
Spawn currently has no releases and relies entirely on building from source. Since the main compiler is currently written in V, you need to install it before building Spawn.
Once V is installed, run the following commands in your terminal:
git clone https://github.com/spawnlang/spawn
cd spawn
make build # or make release for fastest build
By default, make build will build the compiler with debugging information and
without optimizations. If you want to build a compiler with optimizations,
run make release.
Next add SPAWN_ROOT environment variable to your shell profile:
echo "export SPAWN_ROOT=$(pwd)" >> ~/.bashrc
source ~/.bashrc
And to use spawnc executable anywhere, run:
sudo ./spawnc --symlink
On Unix systems, it creates a /usr/local/bin/spawnc symlink to compiler
executable.
To use other tools such as formatter or profiler, run the following commands:
make build-fmt
make build-sprof