# 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 | 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`).