Майнкрафт сервер на rust
  • Rust 99.6%
  • Shell 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Niken 60fd4a7860 Phase 8: Minecraft 1.21.10 (protocol 773) migration
All clientbound play packet IDs and structures updated.
LoginPlay moved from handler.rs to clientbound.rs.
ChunkData: heightmaps array, sections, light masks.
SpawnEntity: velocity before angles, head_pitch.
PlayerInfoUpdate: bitflag actions, new entry fields.
PlayerPosition: dx/dy/dz + u32 relatives flags.
Serverbound play IDs fixed (chat 0x08, command 0x06, etc.).
MovementFlags bitfield instead of bool on_ground.
Race condition fix: skip non-Play players in tick.
SetGamemode replaced with GameStateChange.
8 unit tests for play packet encoders.
2026-07-27 12:46:14 +03:00
benches Phase 8: Minecraft 1.21.10 (protocol 773) migration 2026-07-27 12:46:14 +03:00
config Phase 6: Performance optimization suite 2026-07-27 03:32:50 +03:00
core Phase 8: Minecraft 1.21.10 (protocol 773) migration 2026-07-27 12:46:14 +03:00
net Phase 8: Minecraft 1.21.10 (protocol 773) migration 2026-07-27 12:46:14 +03:00
plugin-runtime Phase 7: WASM plugin API with full isolation 2026-07-27 03:37:34 +03:00
plugin-sdk Phase 7: WASM plugin API with full isolation 2026-07-27 03:37:34 +03:00
protocol Phase 8: Minecraft 1.21.10 (protocol 773) migration 2026-07-27 12:46:14 +03:00
scripts Phase 6: Performance optimization suite 2026-07-27 03:32:50 +03:00
server Phase 8: Minecraft 1.21.10 (protocol 773) migration 2026-07-27 12:46:14 +03:00
world Phase 8: Minecraft 1.21.10 (protocol 773) migration 2026-07-27 12:46:14 +03:00
.gitignore Phase 1: project skeleton, TCP networking, packet framing, state machine, config, tests 2026-07-27 02:57:09 +03:00
AGENTS.md Phase 8: Minecraft 1.21.10 (protocol 773) migration 2026-07-27 12:46:14 +03:00
Cargo.lock Phase 7: WASM plugin API with full isolation 2026-07-27 03:37:34 +03:00
Cargo.toml Phase 7: WASM plugin API with full isolation 2026-07-27 03:37:34 +03:00
PLANS.md Phase 8: Minecraft 1.21.10 (protocol 773) migration 2026-07-27 12:46:14 +03:00
README.md Phase 8: Minecraft 1.21.10 (protocol 773) migration 2026-07-27 12:46:14 +03:00
todos.json Phase 3: world, chunks, NBT, region I/O, generator, heightmaps 2026-07-27 03:18:26 +03:00

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/