# Recommended Tooling for Developing Pumpkin-MC/Pumpkin: Complete Setup Guide

> Master Pumpkin-MC/Pumpkin development with our guide. Explore recommended tools like Rust, Nix, Cargo, Clippy, Rustfmt, and Docker for a streamlined, reproducible setup.

- Repository: [Pumpkin MC/Pumpkin](https://github.com/Pumpkin-MC/Pumpkin)
- Tags: getting-started
- Published: 2026-07-23

---

**The Pumpkin-MC/Pumpkin project officially recommends a Rust-centric toolchain managed by `rustup` and Nix, utilizing `cargo` for builds, `clippy` and `rustfmt` for code quality enforcement, and Docker with VS Code dev containers for fully reproducible development environments.**

Pumpkin-MC/Pumpkin is a Rust-based Minecraft server implementation that requires precise dependency management and compiler versioning to maintain protocol compatibility. The repository ships with declarative configuration files that lock the entire toolchain, ensuring every contributor works with identical versions of the compiler, libraries, and linting rules. Understanding the recommended tooling for developing Pumpkin-MC/Pumpkin ensures your contributions pass continuous integration checks and deploy correctly across platforms.

## Core Language and Build System

### Rust Toolchain Management with rustup

The project pins the exact Rust compiler version in **[`rust-toolchain.toml`](https://github.com/Pumpkin-MC/Pumpkin/blob/main/rust-toolchain.toml)** to guarantee reproducible builds. As of the latest configuration, the file specifies `nightly-2024-08-15`, ensuring access to the latest optimizations and language features required by the networking stack.

The workspace structure is defined in **[`Cargo.toml`](https://github.com/Pumpkin-MC/Pumpkin/blob/main/Cargo.toml)**, which declares the main `pumpkin` crate alongside specialized sub-crates such as `pumpkin-nbt`, `pumpkin-inventory`, and `pumpkin-protocol`. Cargo handles dependency resolution via the workspace resolver, feature flags, and cross-compilation targets.

### Nix for Reproducible Environments

To eliminate "works on my machine" issues, the repository provides **`flake.nix`**, which defines a hermetic development shell containing the exact Rust toolchain, system libraries, and build tools. This Nix flake creates a deterministic environment identical to the CI runners.

Enter the development shell with:

```bash
nix develop

```

Once inside, the `cargo` command automatically uses the nightly compiler specified in [`rust-toolchain.toml`](https://github.com/Pumpkin-MC/Pumpkin/blob/main/rust-toolchain.toml), and all native dependencies (such as OpenSSL or compression libraries) are pre-configured in the `PKG_CONFIG_PATH`.

## Code Quality and Validation

### Linting and Formatting

The project enforces strict code style through **[`rustfmt.toml`](https://github.com/Pumpkin-MC/Pumpkin/blob/main/rustfmt.toml)**. Before committing, run the formatter to ensure compliance:

```bash
cargo fmt

```

For CI-style validation that fails on unformatted code:

```bash
cargo fmt -- --check

```

Static analysis runs via Clippy with warnings treated as errors, as configured in **[`.github/workflows/rust.yml`](https://github.com/Pumpkin-MC/Pumpkin/blob/main/.github/workflows/rust.yml)**:

```bash
cargo clippy -- -D warnings

```

### Dependency Auditing

The CI pipeline integrates **`cargo-deny`** to scan for security advisories and license violations. This automated check runs on every pull request, validating that new dependencies do not introduce incompatible licenses or known vulnerabilities.

## Containerization and IDE Integration

### Docker and Docker Compose

For deployment or testing without installing Rust locally, the repository includes a multi-stage **`Dockerfile`** that compiles the release binary and packages it in a minimal runtime image. The accompanying **[`docker-compose.yml`](https://github.com/Pumpkin-MC/Pumpkin/blob/main/docker-compose.yml)** exposes the standard Minecraft port `25565` and mounts persistent volumes for world data.

Build and run the containerized server:

```bash
docker build -t pumpkin .
docker compose up -d

```

### VS Code Dev Containers

The **[`.devcontainer/devcontainer.json`](https://github.com/Pumpkin-MC/Pumpkin/blob/main/.devcontainer/devcontainer.json)** file configures a complete remote development environment. When you open the repository in VS Code with the Remote-Containers extension, it automatically loads the Nix flake, installs Rust Analyzer, and configures debugging. This provides IntelliSense, hot-reload debugging, and in-container testing without polluting your host system.

## Setting Up Your Development Environment

Follow these steps to configure the recommended Pumpkin-MC/Pumpkin development tooling:

1. **Clone the repository** and ensure `nix` is installed (optional but recommended).

2. **Activate the environment**:
   ```bash
   nix develop
   ```

3. **Verify the toolchain**:
   ```bash
   rustc --version  # Should show nightly-2024-08-15

   cargo --version
   ```

4. **Build the project**:
   ```bash
   cargo build --release
   ```

5. **Run the test suite**:
   ```bash
   cargo test --all
   ```

6. **Validate code quality** (must pass before submitting PRs):
   ```bash
   cargo fmt -- --check
   cargo clippy -- -D warnings
   ```

## Summary

- **Rust toolchain** is pinned to `nightly-2024-08-15` via **[`rust-toolchain.toml`](https://github.com/Pumpkin-MC/Pumpkin/blob/main/rust-toolchain.toml)** to ensure compiler consistency.
- **Nix** provides a hermetic development environment defined in **`flake.nix`**, eliminating dependency conflicts.
- **Cargo** handles builds, testing, and workspace management across the main server and protocol crates.
- **Clippy and rustfmt** enforce code quality standards configured in **[`rustfmt.toml`](https://github.com/Pumpkin-MC/Pumpkin/blob/main/rustfmt.toml)** and **[`.github/workflows/rust.yml`](https://github.com/Pumpkin-MC/Pumpkin/blob/main/.github/workflows/rust.yml)**.
- **Docker** support via **`Dockerfile`** and **[`docker-compose.yml`](https://github.com/Pumpkin-MC/Pumpkin/blob/main/docker-compose.yml)** enables containerized deployment on port `25565`.
- **VS Code Dev Containers** offer a turnkey IDE setup using **[`.devcontainer/devcontainer.json`](https://github.com/Pumpkin-MC/Pumpkin/blob/main/.devcontainer/devcontainer.json)** for remote development.

## Frequently Asked Questions

### What Rust version is required to build Pumpkin-MC/Pumpkin?

The repository requires the nightly compiler version `nightly-2024-08-15`, as specified in **[`rust-toolchain.toml`](https://github.com/Pumpkin-MC/Pumpkin/blob/main/rust-toolchain.toml)**. Running `rustup show` in the repository root will automatically download and activate this specific toolchain, ensuring you build with the exact version used in production and CI.

### Is Nix mandatory for contributing to Pumpkin?

Nix is not mandatory but strongly recommended. You can install Rust manually via rustup and ensure you match the version in [`rust-toolchain.toml`](https://github.com/Pumpkin-MC/Pumpkin/blob/main/rust-toolchain.toml). However, using `nix develop` guarantees you have all system libraries and tools (like `cargo-deny`) without manual configuration, matching the environment defined in **`flake.nix`**.

### How do I run the full test suite locally?

Execute `cargo test --all` from the workspace root. This command runs unit and integration tests across all crates in the workspace, including `pumpkin-nbt`, `pumpkin-protocol`, and the core server. The CI pipeline in **[`.github/workflows/rust.yml`](https://github.com/Pumpkin-MC/Pumpkin/blob/main/.github/workflows/rust.yml)** runs this same command on every pull request.

### Can I develop Pumpkin without installing Rust on my host machine?

Yes. By using the **VS Code Remote-Containers** extension with **[`.devcontainer/devcontainer.json`](https://github.com/Pumpkin-MC/Pumpkin/blob/main/.devcontainer/devcontainer.json)**, you can develop entirely within a Docker container that includes the full Rust toolchain. Alternatively, you can use `docker compose up` to run the pre-built server for testing, though this limits your ability to compile changes without rebuilding the image.