A reimplementation of the Minecraft Server in pure Rust
Find a file
TheTxT f00ab14abb
All checks were successful
Build, test and push / test (push) Successful in 3m25s
Build, test and push / build_server_docker_image (push) Successful in 3m30s
Build, test and push / push_server (push) Successful in 11s
Build, test and push / formatting (push) Successful in 8s
Build, test and push / clippy (push) Successful in 1m1s
Add CONTRIBUTING.md
2026-05-29 17:53:13 +02:00
.forgejo/workflows run some forgejo actions checks for pull requests 2026-05-20 18:29:31 +02:00
.github convert github actions workflow to forgejo actions 2025-08-18 18:15:03 +02:00
basic_types update version of all crates to 0.8.0 2026-05-17 18:59:45 +02:00
client_lib use BufReader to read packets in server #36 2026-05-17 18:54:34 +02:00
data update version of all crates to 0.8.0 2026-05-17 18:59:45 +02:00
data_generator_tools update version of all crates to 0.8.0 2026-05-17 18:59:45 +02:00
e2e_tests comment out some code to make warning go away 2026-04-08 14:26:13 +02:00
lib fix world storage location; didnt have minecraft directory in dimensions 2026-05-27 18:30:07 +02:00
proxy update version of all crates to 0.8.0 2026-05-17 18:59:45 +02:00
server make sure that chunks are loaded before changing dimension there 2026-05-25 12:16:47 +02:00
.gitignore Merge branch 0.4.0 into main 2026-01-18 14:16:55 +01:00
Cargo.lock update version of all crates to 0.8.0 2026-05-17 18:59:45 +02:00
Cargo.toml begin implementing a client library (client_lib) and end to end tests 2026-03-31 17:14:15 +02:00
CONTRIBUTING.md Add CONTRIBUTING.md 2026-05-29 17:53:13 +02:00
docker-compose.build.yml Added OXIDE_MOTD config 2025-09-02 10:24:28 +02:00
docker-compose.yml Whoops 2025-09-02 10:38:11 +02:00
Dockerfile fix Dockerfile 2025-09-13 19:10:05 +02:00
LICENSE Create LICENSE 2025-07-27 14:30:41 +02:00
README.md Add CONTRIBUTING.md 2026-05-29 17:53:13 +02:00
rustfmt.toml fix last commit 2026-03-08 21:27:56 +01:00

The primary source lives on my own forgejo instance at git.thetxt.io. Please also submit issues there. Registration also works through your GitHub or Discord account, so you don't have to remember yet another password.

Oxide

The Oxide Minecraft Server aims to implement a fully functional Minecraft Server, compatible with the latest version, from scratch entirely in Rust.

You can try it right now by joining play.oxide.thetxt.io

This repository contains the Oxide Minecraft Server, as well as all auxillary parts described below. Each of these parts live in their own subdirectory.

The main purpose of this repository is for me to learn and share my gained knowledge through a series of YouTube videos.

Please don't run it with any worlds you aren't prepared to lose.

Features

Currently implemented

This list is non-exhaustive, but covers the most important parts.

  • Multiple players with basic interactions (see item in hand or armor and their position)
  • Chat (without encryption) and some basic commands
  • Placing and breaking blocks (very few block state rules implemented)
  • Loading and saving vanilla worlds
  • Creative mode
  • Basic survival features (WIP)
  • Block entities (chests, furnaces (only smelting raw iron with coal) and signs for now)
  • Entities with basic AI
  • Crafting & Smelting
  • Nether and End dimensions

Missing

These will be implemented in the nearish future

  • More commands
  • Protocol encryption / online mode
  • Packet compression
  • More block state rules
  • Rules on which blocks can be placed on which other blocks

Running

For testing

You can run the server by just executing cargo run in the server subdirectory.

For "production"

Remember, this is very alpha software that will at some point delete your worlds or damage them otherwise!

I recommend running through docker using the provided docker-compose.yml file. There is also a docker-compose.build.yaml file that builds a fresh image locally, instead of using the pre-built image from the gibthub container registry.

Configuration

Configuration is handled through environment variables.

Key Default value Format Notes
OXIDE_LISTEN_ON 0.0.0.0:25565 [ip]:[port]
OXIDE_WORLD_PATH ./world any path ./ must be explicitly stated
OXIDE_SAVE_SECONDS 60 Whole seconds
OXIDE_MOTD Hello oxide! String Quick and dirty hack, Freaks out on windows if string is contained in quotes or includes spaces and i don't know why...
OXIDE_DEFAULT_GAMEMODE survival survival OR creative OR adventure OR spectator The gamemode players that connect for the first time get assigned

Repository contents

server

This is the actual Minecraft server.

proxy

This is a very basic proxy to intercept communication between the minecraft client and server. It listens on localhost port 35565 and connects to a server running on localhost port 25565, without a way to configure these at the moment. It has access to all the packet deserialization/serialization code which makes this proxy useful for testing their implementations against the official minecraft server.

lib

A library containing common functionality that is shared between the server and proxy. This mostly includes the logic to deserialize and serialize packets and some common types.

basic_types

As the name suggests, this library crate contains some basic types that are used by all other crates.

data_generator_tools

Extremely rough program to generate the data library crate from the official servers generated json files. It expects a directory official_server in the root of the project. The jar of the desired official server then needs to be downloaded into this directory. Executing java -DbundlerMainClass="net.minecraft.data.Main" -jar official_server.jar -all then generates the required json files. Afterwards you can run cargo run -p data_generator_tools to generate/update the data crate.

data

Another library that contains data on biomes, blocks, items, block entities, inventories, loot tables, recipes and tags. It is mostly generated using the data_generator_tools crate.

Contributing

See CONTRIBUTING.md

Dependencies

This project aims to minimally rely on third party dependecies. Everything related to Minecraft is fully custom. There are still some third party dependencies:

  • flate2 for compression and decompression
  • dashmap for parallel hashmaps
  • rand for random number generation

The jzon crate is also used in the data_gnerator_tools utility for working with the generated json files from the official Minecraft server.

Credit

This project wouldn't be possible without the contributors of the Minecraft wiki.