#minecraft

macro sandstone-derive

Derive package for minecraft protocol traits

2 releases

0.1.1 Jun 24, 2024
0.1.0 Jun 2, 2024

#261 in #minecraft

Download history 38/week @ 2024-06-25 20/week @ 2024-07-02 5/week @ 2024-07-23 4/week @ 2024-07-30 11/week @ 2024-09-10 8/week @ 2024-09-17 20/week @ 2024-09-24 19/week @ 2024-10-01 2/week @ 2024-10-08

60 downloads per month
Used in sandstone

MIT license

5KB
76 lines

sandstone-derive

This is a support package for my other project, sandstone. It provides a procedural macro for deriving the necessary traits for the sandstone library.

This package enables derives for the McSerialize and McDeserialize traits from the sandstone library.

Example

#[derive(McSerialize, McDeserialize)]
pub struct TestStruct {
    pub field1: i32,
    pub field2: String,
}

This will create mc_serialize and mc_deserialize implementations for the struct TestStruct. This allows it to be sent over the minecraft protocol.

This package is meant to be used in conjunction with the sandstone library, and is not intended to be used on its own.

Dependencies

~245–690KB
~17K SLoC