Skip to content

Initial setup

Henry Zimmerman edited this page Oct 2, 2018 · 6 revisions

Note, this page assumes you are using Nixos, if you use another Linux distribution, you can install the nix package manager, which should allow the following instructions to apply. It also makes the assumption that you are already using nightly rust, which if you are not, you should consult rustup's documentation on how to set that up.

Initially:

  1. Run cargo install cargo-watch.

Backend

  1. Clone Repo
  2. Run nix-shell.
  3. Run cargo install diesel_cli --no-default-features --features "postgres". The build is known to work on rust toolchain: rustup default nightly-2018-05-05.
  4. Navigate to the /backend/db directory.
  5. Run diesel setup. This will create the weekend db in postgres and should run all existing migrations in the /backend/db/migrations/ folder (because it already exists).
  6. From either /backend/ or / run cargo build --release to build in release mode.

Frontend

  1. The repo should be cloned.
  2. Run cargo install cargo-web.
  3. Run rustup target add wasm32-unknown-unknown (no longer strictly necessary, cargo web build should pull it in via rustup automatically).
  4. Navigate to /frontend/app/ and run cargo web build to build in release mode.

(Frontend builds are broken on Nixos because of rustup not properly utilizing libstdc++.so.6) you may want to try installing it using your standard package manager if you are not using NIXOS.