Майнкрафт сервер на rust
- Rust 99.6%
- Shell 0.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| benches | ||
| config | ||
| core | ||
| net | ||
| plugin-runtime | ||
| plugin-sdk | ||
| protocol | ||
| scripts | ||
| server | ||
| world | ||
| .gitignore | ||
| AGENTS.md | ||
| Cargo.lock | ||
| Cargo.toml | ||
| PLANS.md | ||
| README.md | ||
| todos.json | ||
MIRST — Minecraft Rust Server
Vanilla-compatible Minecraft 1.21.x server written in Rust. Focus on performance, safety, and WASM plugin isolation.
Features
- ✅ Full protocol stack (handshake → status → login → play)
- ✅ Online/offline mode, encryption (AES/CFB8), compression
- ✅ Anvil region I/O, NBT, chunk generation
- ✅ 20 TPS game loop, player movement, keepalive
- ✅ Entity system: passive mobs (cow, sheep, pig, chicken) and hostiles (zombie, skeleton)
- ✅ Block interactions, inventory, vanilla commands
- ✅ Tab list with latency, per-player entity visibility
- ✅ WASM plugin runtime (wasmtime) with memory/CPU sandbox
- ✅ Server.properties (all vanilla options) + mirst.toml
- ✅ Criterion benchmarks, flamegraph profiling
Build & Run
cargo build --release
./target/release/mirst
Default port 25565. Configure via server.properties and mirst.toml.
Plugins
Place .wasm + *.toml manifest files in plugins/:
[plugin]
name = "my-plugin"
version = "1.0.0"
entry = "my-plugin.wasm"
hooks = ["on_chat", "on_tick"]
memory_max_mb = 30
Benchmarks
cargo bench
Profiling
./scripts/flamegraph.sh
Architecture
| Layer | Crate |
|---|---|
| Plugin | plugin-runtime/ |
| Game | server/ |
| World | world/ |
| Protocol | protocol/ |
| Network | net/ |
| Config | config/ |
| Core | core/ |