| Crates.io | rkon |
| lib.rs | rkon |
| version | 0.1.0 |
| created_at | 2025-04-16 03:41:41.680389+00 |
| updated_at | 2025-04-16 03:41:41.680389+00 |
| description | Yet another RCON library. |
| homepage | |
| repository | https://codeberg.org/redstrate/rkon |
| max_upload_size | |
| id | 1635776 |
| size | 42,696 |
Yet another RCON library.
std.An example client is available under examples/client.rs which uses the Client type.
Since an RCON server would be tightly integrated with the game server, it doesn't make sense to provide a generic solution. Instead, you can use this crate to encode packets:
// read from client
let mut resp_bytes = [0u8; MAX_PACKET_SIZE];
stream.read(&mut resp_bytes).unwrap();
// decode
let request = Packet::decode(&resp_bytes);
// send response
let response = Packet {
request_id: request.request_id,
PacketType::Command,
body: "foobar"
};
let encoded = response.encode();
// send to the client
stream.write_all(&encoded).unwrap();
Thanks to the minecraft-client-rs project where some of this code is based off of. I took a different approach for the API, and plan on expanding support beyond just Minecraft.

This project is licensed under the GNU General Public License 3.