Developer Guides
Welcome to the Void developer guides. Here you'll find comprehensive documentation for getting started, developing, and testing Void.
Quick Navigation
New to Void? Start here! Learn how to:
- Install and run the server
- Understand the project structure
- Connect with a Minecraft client
- Learn key architectural concepts
Set up your development environment and learn best practices:
- IDE setup (VS Code, CLion)
- Code organization and naming conventions
- Working with the protocol and macros
- Async/Tokio patterns
- Git workflow
- Debugging and optimization
Write and run tests with confidence:
- Unit tests, integration tests, documentation tests
- Testing strategies for each component
- Running the test suite
- Coverage goals and best practices
- Common test patterns
Topics by Role
For Backend Developers
- Getting Started - Set up and understand the basics
- Development Guide - Configure your environment
- Architecture (from main nav) - Understand the design
- Testing Guide - Write quality code
Typical workflow:
# Setup
cargo build && cargo test
# Development
git checkout -b feature/your-feature
# ... make changes ...
# Test and verify
cargo fmt && cargo clippy && cargo test
# Submit PR
git push origin feature/your-feature
For Performance Optimizers
- Getting Started - Understand the project
- Performance Metrics (from main nav) - Learn what we measure
- Benchmarking (from main nav) - Profile and optimize
- Development Guide - Use profiling tools
Key tools:
cargo bench - Run benchmarks
cargo flamegraph - Visualize hot spots
- Performance metrics dashboard
For QA & Testing
- Testing Guide - Understand our test strategy
- Performance Metrics - Learn performance testing
- Getting Started - Set up test environment
Key responsibilities:
- Running test suite
- Manual testing scenarios
- Performance regression detection
- Documentation of test results
Common Tasks
Running the Server
# Development (debug build)
cargo run
# Release (optimized)
cargo run --release
# With custom settings
RUST_LOG=debug cargo run --release
Server starts at 127.0.0.1:25565
Testing Changes
# All tests
cargo test
# Specific test
cargo test test_name
# With output
cargo test -- --nocapture
# Single-threaded
cargo test -- --test-threads=1
Code Quality
# Format
cargo fmt
# Lint
cargo clippy -- -D warnings
# Documentation
cargo doc --no-deps --open
Performance Analysis
# Benchmarks
cargo bench
# Flame graph
cargo flamegraph
open flamegraph.svg
# Memory profiling
cargo tarpaulin --out Html
Project Structure
void/ # Main server
src/
main.rs # Entry point
server.rs # Server implementation
client.rs # Client handler
game.rs # Game state
void-protocol/ # Protocol definitions
src/
clientbound/ # Server → Client
status/, login/, play/
serverbound/ # Client → Server
void-codec/ # Encoding/Decoding
src/
primitives/ # Basic types
void-codec-macros/ # Procedural macros
src/
encode.rs, decode.rs
void-net/ # Async networking
src/
socket.rs
Key Concepts
Protocol States
Handshake → Status → Login → Configuration → Play
Each state handles different packets.
Async Architecture
- Non-blocking I/O with Tokio
- One task per client
- Shared state via
Arc<Mutex<T>>
Type Safety
- Rust's type system prevents many errors
- Macros auto-derive Encode/Decode
- Protocol validated at compile-time
Getting Help
- Questions? Open a GitHub Discussion
- Found a bug? Report an issue
- Need help? Check existing discussions
- Want to contribute? Read the Contributing guide
Next Steps
Choose your path:
- I want to build features → Development Guide
- I want to optimize performance → Performance Metrics
- I want to ensure quality → Testing Guide
- I want to contribute → Contributing Guide
- I want to understand the design → Architecture
Happy coding! 🎮 If you have questions, don't hesitate to reach out!