This document is to help you to set up your course workspace.
Course homeworks are guaranteed to compile and work in Linux and macOS. Please note that any other operating system is not supported through it may work natively, using Docker, WLS, or other virtualization tools.
Install rustup either using the official guide or using your package manager such as apt, pacman or brew.
On Linux, you probably have the C language linker, but make sure you already have it by installing build-essential using your package manager.
On MacOS, users have to install XCode tools to get a C language linker.
xcode-select --installRun this command to get the stable Rust compiler:
rustup update stableThe only supported editor in the course is Visual Studio Code. Install it. Then, install the following plugins:
- rust-analyzer - language server, your best friend.
- Better TOML - syntax highlight for
.tomlfiles. - CodeLLDB - optional, needed for debugging.
IDE such as CLion or editors with plugins such ad Vim will work perfectly because of Rust's nature, but the lecturer doesn't use them and won't support them officially.
It's not necessary, but may be convenient to create a workspace folder first:
mkdir workspace
cd workspaceClone the repository:
git clone https://gitlab.com/alex.stanovoy/mipt-rust.git
cd mipt-rustWe have a course assistant named rover. It will automatize the part of your solving routine. Go to build and install it with the command:
cargo install --path tools/roverProbably, you'll need libssl-dev installed to build rover. Install it if needed.
From this moment, you can call it from any place you want! Just try to type:
rover --helpTo uninstall it later, run this line from anyplace:
cargo uninstall roverHere you can read more information (mostly useless for a student) about rover.
Read the document about solving and submitting problems. Solve the add problem.
-
Register in testing system. You can find the secret code in the course channel.
-
Clone your repository near the course repository in the folder named solutions:
git clone YOUR_SOLUTIONS_REPOSITORY_IN_MANYTASK solutions
-
The directory structure should be:
$ tree -L 1 . ├── mipt-rust ├── solutions -
Copy the workflow file from course repository and push it to the remote:
cp mipt-rust/.grader-ci.yml solutions/.gitlab-ci.yml cd solutions git add . git commit -m "Add .gitlab-ci.yml" git push
-
Try to submit your solution to CI by running
rover submitin the folder of the problemadd. Feel free to ask any questions if something is wrong.