Skip to content

Getting started

Marcin edited this page Oct 11, 2020 · 2 revisions

Setting up dev env

Prerequisites

  • any Linux distro capable of running rust,
  • or Windows 10 Pro version capable of running WSL2/WSL

In order to set up your dev environment, one can do following:

Linux

  1. Install rust if not done already
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  1. Clone snake2d repository
  2. In cloned repo, run to check if project compiles:
cargo build
  1. Configure your X server, if your distro does not have it already. Skip this step if on WSL/WSL2.
  2. Run game to check if X server works:
cargo run
  1. Download you IDE of preference. You can use IDEA Community edition (https://www.jetbrains.com/idea/download/other.html) and install official JetBrains Rust plugin.
  2. Open the project, set up default Rust toolchain, build and run project.

Windows 10

  1. Install WSL2/WSL: https://docs.microsoft.com/en-us/windows/wsl/install-win10
  2. Set up an X Server for Windows: https://techcommunity.microsoft.com/t5/windows-dev-appconsult/running-wsl-gui-apps-on-windows-10/ba-p/1493242
  3. Proceed as per Linux section
  4. Optionally: install Windows Terminal, change default shell to WSL/WSL2, and set default color scheme.
Clone this wiki locally