Currently due to different computer architecture, we provide different approaches to make contributors can easily involve in.
Devcontainer, short for Development Container, is a feature provided by the Visual Studio Code Remote - Containers extension that allows you to develop code in an isolated Docker container environment. The purpose of this tool is to solve the 'it works on my machine' problem by standardizing the development environment to ensure consistency among development teams.
-
Install VS Code and Docker
-
Open VS Code and install
Remote - Containers
-
Press
Ctrl+Shift+P
(Windows) /command+Shift+P
(Mac) and typeRemote-Containers: Reopen in Container
-
Then VS Code will reopen the project in the container.
-
Install Docker Desktop
-
Start Docker Desktop and open terminal
docker pull ubuntu:latest
docker run -it ubuntu:latest /bin/bash
- Now we are in the docker container, install dependencies
apt update
apt install git
apt install curl
apt install gcc
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs/ | sh
rustup install nightly
. "$HOME/.cargo/env"
rustup default nightly
- Clone git repo
cd home
git clone https://github.com/Lind-Project/safeposix-rust.git
cd safeposix-rust
git checkout mac-only
- Build
cargo build
- Run test suite
chmod +x gen_netdevs.sh
./gen_netdevs.sh
cargo test --lib
- Setting environment
apt update
apt install git
apt install curl
apt install gcc
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs/ | sh
rustup install nightly
. "$HOME/.cargo/env"
rustup default nightly
- Clone git repo
cd home
git clone https://github.com/Lind-Project/safeposix-rust.git
- Build
cargo build
- Run test suite
chmod +x gen_netdevs.sh
./gen_netdevs.sh
cargo test --lib