2025-05-05 04:26:36 +03:00
2025-05-05 04:22:20 +03:00
2025-05-10 01:40:59 +03:00
2025-05-03 16:42:55 +03:00
2025-05-07 17:55:32 +03:00
2025-05-07 18:28:03 +03:00
2025-05-03 02:45:42 +03:00
2025-05-07 12:04:55 +03:00
2025-05-10 01:39:38 +03:00
2025-05-05 04:26:36 +03:00
2025-05-07 12:40:34 +03:00

rust_mc_serv

Simple Minecraft server (java edition) written in pure rust.

Supported versions

  • 1.21.5 (PVN 770)

How to run

First of all, you need to get a binary, that can be done using these methods:

Download from release

At the moment, there are no releases as the project is in developement

If you want to build the latest binary on your own, please refer to the following method.

Build it yourself

To build the project by yourself, you should to:

  1. Download and install Rust
  2. Download source code of the project (from zip or git clone)
  3. Open terminal in the project folder and run the following commands:

To run:

cargo run

To build (the built binary will be in target/release):

cargo build -r

Use as a library

You can use the project as a library in your servers

Example of adding in Cargo.toml:

rust_mc_serv = { git = "https://github.com/MeexReay/rust_mc_serv.git" }

Example of running a server:

let config = Arc::new(Config::default());
let mut server = ServerContext::new(config);

// Добавляем дефолтную обработку режима Play
server.add_packet_handler(Box::new(PlayHandler)); 
server.add_listener(Box::new(PlayListener));

server.add_listener(Box::new(ExampleListener)); // Добавляем пример листенера
server.add_packet_handler(Box::new(ExamplePacketHandler)); // Добавляем пример пакет хандлера

start_server(Arc::new(server));

Configuration

By default, the config will be created in config.toml in the working directory. To change this path, specify it as the first argument to the server, example: ./rust_mc_serv /path/to/config.toml

Contributing

If you would like to contribute to the project, feel free to fork the repository and submit a pull request.

License

This project is licensed under the WTFPL License

Description
Simple Minecraft server (java edition) written in pure rust
Readme 307 KiB
Languages
Rust 97.4%
Python 2.4%
Nix 0.2%