File size: 1,964 Bytes
d086025 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | # Environment setup
## Install Rust
Install Rust via [rustup](https://rustup.rs). The minimum supported Rust version is
`1.74`.
## Clone the repository
```bash
git clone https://github.com/skyzh/mini-lsm
cd mini-lsm
```
## Starter code
Students work inside the `mini-lsm-starter` directory:
```bash
cd mini-lsm-starter
code .
```
## Install tools
Install the helper tools used by the course (from the repository root):
```bash
cargo x install-tools
```
This installs `cargo-nextest`, `mdbook` (+ `mdbook-toc`), and `cargo-semver-checks`.
## `cargo x` subcommands
The `xtask` crate exposes the following subcommands via `cargo x <subcommand>`:
| Subcommand | Description |
| -------------------------- | ------------------------------------------------------------------ |
| `install-tools` | Install development tools (`cargo-nextest`, `mdbook`, `mdbook-toc`, `cargo-semver-checks`). |
| `copy-test --week N --day M` | Copy the test cases for a given week/day into `mini-lsm-starter/src/tests`. |
| `scheck` | Format, check, test (`cargo nextest run`), and lint the starter crate. |
| `check` | Format, check, test, and lint the whole workspace (reference solution). |
| `ci` | Run the CI jobs (format check, check, test, clippy, build the book). |
| `book` | Build and serve the `mini-lsm-book` mdBook locally. |
| `sync` | Synchronize the starter crate with the reference solution public API (course developers). |
| `show` | Print environment variables (`CARGO_MANIFEST_DIR`, current dir). |
## Run tests
```bash
cargo x copy-test --week 1 --day 1
cargo x scheck
```
The test suites live in `mini-lsm/src/tests` (weeks 1–2), `mini-lsm-mvcc/src/tests`
(week 3), and `mini-lsm-starter/src/tests` (copied in by `copy-test`).
|