Installing Spade
Windows
Spade currently does not natively support Windows, so you have to do the rest of the tutorial inside the Windows Subsystem for Linux (WSL). If you have not installed it yet, do so by following the instructions at https://learn.microsoft.com/en-us/windows/wsl/install
Once done, open a WSL shell by just typing wsl in cmd, and then follow the Linux instructions
Linux
-
First, install Rust by running
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shand accepting the default options when prompted
-
Restart your terminal to get access to the new binaries this installed
-
If you are on a fresh Linux or WSL install, you have to install a few packages for the next step:
sudo apt install build-essential libssl-dev pkg-config git(Or the equivalent packages on your distro of choice)
-
Install the Spade build tool called
swimwithcargo install --git https://gitlab.com/spade-lang/swim -
Install some additional tools that Swim needs with
swim install-tools
macos
-
Install Rust by running
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -
Restart your terminal to get access to the new binaries this installed
-
Install the Spade build tool called
swimwithcargo install --git https://gitlab.com/spade-lang/swim -
Install some additional tools that Swim needs with
swim install-tools
Testing the setup
If all commands executed successfully, should now be able to run the first example application. First, clone the tutorial repo
git clone https://gitlab.com/spade-lang/agile-tutorial.git
cd into the first project
cd agile-tutorial/game
And run
swim build && swim command cargo run
If everything works out, this should open a window containing a black background with stars, and a purple cube that moves around in a circle.
Set up your editor
You may also want to set up your editor to support Spade, see the Editor Setup section for instructions.