Content
# Pure
Foundation for a Minecraft Bedrock server runtime in Rust.
## What Is Implemented
- UDP server loop with ticking world state.
- Bedrock status ping and MOTD generation.
- RakNet offline handshake:
- `UnconnectedPing`
- `OpenConnectionRequest1`
- `OpenConnectionRequest2`
- RakNet connected transport foundation:
- ACK decoding/encoding
- frame set decoding/encoding
- encapsulated reliability metadata
- `ConnectedPing`
- `ConnectionRequest`
- `ConnectionRequestAccepted`
- `NewIncomingConnection`
- Bedrock game-packet foundation over `0xfe` RakNet payloads:
- packet header codec
- packet batch codec
- `RequestNetworkSettings`
- `NetworkSettings`
- `PlayStatus`
- `Disconnect`
- Multi-version registry:
- primary advertised version for MOTD
- additional supported protocol profiles for negotiation
- per-version packet ID table support
- Configurable network trace logging:
- discovery
- RakNet offline
- RakNet datagrams
- RakNet packets
- Bedrock packets
- session state changes
- hex preview of payloads
## What Is Still Missing
- Split RakNet packet reassembly.
- Compression pipeline after `NetworkSettings`.
- Encryption / login handshake.
- Full Bedrock login flow and gameplay packets:
- `StartGame`
- chunks
- entities
- inventory
- commands
- Version translators for real gameplay packet schemas.
Right now the server can negotiate RakNet and Bedrock network settings, but it is not yet a playable Bedrock server.
## Quick Start
The server loads its settings from `server.toml` in the repository root.
If the file does not exist yet, Pure now creates a commented template on first start.
```bash
cargo run -p pure
```
Use a custom config path with:
```bash
cargo run -p pure -- --config ./config/server.toml
```
See [docs/configuration.md](docs/configuration.md) for a field-by-field explanation of the TOML config.
## Library Usage
```rust
use pure::{GameMode, ServerBuilder};
#[tokio::main]
async fn main() -> std::io::Result<()> {
let server = ServerBuilder::new()
.with_bind_addr(([0, 0, 0, 0], 19132))
.with_server_name("My Bedrock Server")
.with_world_name("sandbox")
.with_game_mode(GameMode::Creative)
.with_max_players(50)
.build();
server.run().await
}
```
## Packet Logging
```rust
use pure::{GameMode, NetworkTraceConfig, ServerBuilder};
#[tokio::main]
async fn main() -> std::io::Result<()> {
let server = ServerBuilder::new()
.with_bind_addr(([0, 0, 0, 0], 19132))
.with_server_name("Trace server")
.with_network_trace(NetworkTraceConfig::verbose())
.with_game_mode(GameMode::Survival)
.build();
server.run().await
}
```
Or use `.with_verbose_packet_logging()` for the same preset.
## Multi-Version Example
```rust
use pure::{BedrockVersion, GameMode, ServerBuilder};
#[tokio::main]
async fn main() -> std::io::Result<()> {
let server = ServerBuilder::new()
.with_bind_addr(([0, 0, 0, 0], 19132))
.with_server_name("Proxy-style foundation")
.with_world_name("multiversion")
.with_version_name("1.21.111")
.with_protocol_version(844)
.with_supported_versions(vec![
BedrockVersion::new(700, "legacy-profile"),
BedrockVersion::new(844, "1.21.111"),
])
.with_game_mode(GameMode::Survival)
.build();
server.run().await
}
```
The exact protocol numbers and packet tables still need to match the client versions you want to support.
Connection Info
You Might Also Like
hyperframes
Write HTML. Render video. Built for agents.
palmier-pro
macOS video editor with AI generation
FireRed-OpenStoryline
FireRed-OpenStoryline is an AI video editing agent that transforms manual...
vexa
Open-source meeting transcription API for Google Meet, Microsoft Teams &...
MAI-UI
MAI-UI provides GUI agents focused on real-world applications.
vllm-mlx
OpenAI-compatible server for Apple Silicon. Run LLMs and vision-language...