Dev setup
Mac & Linux
-
On Mac:
brew install git just sqlx-cli mdbook postgresql shellcheck tokei ripgrep bat exa procs fd sd cue-lang/tap/cue npm install -g zx
On Linux:
cargo install sqlx-cli mdbook just tokei ripgrep bat exa procs fd sd sudo apt-get install git shellcheck postgresql brew install cue-lang/tap/cue npm install -g zx
-
Install mkcert: https://github.com/FiloSottile/mkcert
- Make sure to run
mkcert -install
to install the dev CA, but no need manually generate any certs.
- Make sure to run
-
Install GitHub Desktop: https://desktop.github.com/
-
Install Node
-
Install nvm: https://github.com/nvm-sh/nvm
-
Install specific versions of Node and NPM:
nvm install v16.14.2 nvm alias default v16.14.2 npm install -g npm@8.5.5 node --version && npm --version
-
-
Install Rust
-
Install rustup: https://www.rust-lang.org/tools/install
-
Install components:
rustup component add rustc cargo rust-std rustfmt clippy rust-docs
-
Check that Rust is >=1.62.0:
rustc --version
-
-
Install the Protocol Buffers compiler:
-
Manually download the binary (brew and apt for protoc are pretty out of date):
cd ~ # This URL is for Intel Macs - for other machines check https://github.com/protocolbuffers/protobuf/releases curl -o ~/protoc.tar.gz -L https://github.com/protocolbuffers/protobuf/releases/download/v21.1/protoc-21.1-osx-x86_64.zip mkdir -p ~/protoc unzip protoc.tar.gz -d ~/protoc rm ~/protoc.tar.gz
-
Add the following to your
.bash_profile
/.zshenv
/ etc:export PATH="$HOME/protoc/bin:$PATH" # meant to be consumed by the `prost-build` Rust crate: export PROTOC="$HOME/protoc/bin/protoc" export PROTOC_INCLUDE="$HOME/protoc/include"
-
Check that protoc is >=3.21.1:
protoc --version
-
-
Install Docker Desktop for Mac: https://docs.docker.com/docker-for-mac/install/
-
Check that Docker is >=20.10.11 and Docker Compose is >=1.29.2:
docker --version && docker-compose --version
-
This step is not needed for Linux, as resources are already unlimited.
Increase the system resources granted to Docker. This is necessary because compiling release binaries in Rust is very resource-intensive — especially compiling & optimizing a large number of dependencies. Example configuration:
-
Clone + Build + Run
-
Create a GitHub personal access token per these instructions.
- For scopes, all you need is the
repo
group. - Keep the personal access token in something like 1Password.
- For scopes, all you need is the
-
Clone:
mkdir -p ~/git && cd ~/git git clone https://github.com/realismlabs/dataland git clone https://github.com/realismlabs/dataland-infra git clone https://github.com/realismlabs/dataland-engineering-handbook
- When asked for a username, use your GitHub username.
- When asked for a password, use your personal access token, not your GitHub account password.
-
cd into dataland repo:
cd ~/git/dataland
-
Build and run:
just setup
-
Go to https://app.dataland.land - if everything works then the setup is complete.
VSCode
-
Install VSCode: https://code.visualstudio.com/
-
Go to Extensions and search for
@recommended
. Install all the Workspace Recommendations.- See here for details.
-
Bring up the Command Palette (
Shift+Command+P
) and run:Shell Command: Install 'code' command in PATH
-
Open the Dataland repo in VSCode:
code ~/git/dataland
-
Check that the Rust extension is working. Bring up Quick Open (
Command+P
) and open:dataland-server/main.rs
Clicking through symbols (
Command+Click
) to their definition sites should work.