fork/rust_serialization_benchmark

git clone https://git.julia.blue/fork/rust_serialization_benchmark

David KoloskiAdd abomonation and capnproto benchesb375165

bebop
2.9 KiB139 linesraw
1@0xa093b6e172459c50;
2
3enum GameType {
4    survival @0;
5    creative @1;
6    adventure @2;
7    spectator @3;
8}
9
10struct Item {
11    count @0 :Int8;
12    slot @1 :UInt8;
13    id @2 :Text;
14}
15
16struct Abilities {
17    walkSpeed @0 :Float32;
18    flySpeed @1 :Float32;
19    mayFly @2 :Bool;
20    flying @3 :Bool;
21    invulnerable @4 :Bool;
22    mayBuild @5 :Bool;
23    instabuild @6 :Bool;
24}
25
26struct Entity {
27    id @0 :Text;
28    pos :group {
29        x @1 :Float64;
30        y @2 :Float64;
31        z @3 :Float64;
32    }
33    motion :group {
34        x @4 :Float64;
35        y @5 :Float64;
36        z @6 :Float64;
37    }
38    rotation :group {
39        x @7 :Float32;
40        y @8 :Float32;
41    }
42    fallDistance @9 :Float32;
43    fire @10 :UInt16;
44    air @11 :UInt16;
45    onGround @12 :Bool;
46    noGravity @13 :Bool;
47    invulnerable @14 :Bool;
48    portalCooldown @15 :Int32;
49    uuid :group {
50        x0 @16 :UInt32;
51        x1 @17 :UInt32;
52        x2 @18 :UInt32;
53        x3 @19 :UInt32;
54    }
55    customName @20 :Text;
56    customNameVisible @21 :Bool;
57    silent @22 :Bool;
58    glowing @23 :Bool;
59}
60
61struct RecipeBook {
62    recipes @0 :List(Text);
63    toBeDisplayed @1 :List(Text);
64    isFilteringCraftable @2 :Bool;
65    isGuiOpen @3 :Bool;
66    isFurnaceFilteringCraftable @4 :Bool;
67    isFurnaceGuiOpen @5 :Bool;
68    isBlastingFurnaceFilteringCraftable @6 :Bool;
69    isBlastingFurnaceGuiOpen @7 :Bool;
70    isSmokerFilteringCraftable @8 :Bool;
71    isSmokerGuiOpen @9 :Bool;
72}
73
74struct Player {
75    gameType @0 :GameType;
76    previousGameType @1 :GameType;
77    score @2 :UInt64;
78    dimension @3 :Text;
79    selectedItemSlot @4 :UInt32;
80    selectedItem @5 :Item;
81    spawnDimension :union {
82        none @6 :Void;
83        some @7 :Text;
84    }
85    spawn :group {
86        x @8 :Int64;
87        y @9 :Int64;
88        z @10 :Int64;
89    }
90    spawnForced :union {
91        none @11 :Void;
92        some @12 :Bool;
93    }
94    sleepTimer @13 :UInt16;
95    foodExhaustionLevel @14 :Float32;
96    foodSaturationLevel @15 :Float32;
97    foodTickTimer @16 :UInt32;
98    xpLevel @17 :UInt32;
99    xpP @18 :Float32;
100    xpTotal @19 :Int32;
101    xpSeed @20 :Int32;
102    inventory @21 :List(Item);
103    enderItems @22 :List(Item);
104    abilities @23 :Abilities;
105    enteredNetherPosition :union {
106        none @24 :Void;
107        some :group {
108            x @25 :Float64;
109            y @26 :Float64;
110            z @27 :Float64;
111        }
112    }
113    rootVehicle :union {
114        none @28 :Void;
115        some :group {
116            uuid :group {
117                x0 @29 :UInt32;
118                x1 @30 :UInt32;
119                x2 @31 :UInt32;
120                x3 @32 :UInt32;
121            }
122            entity @33 :Entity;
123        }
124    }
125    shoulderEntityLeft :union {
126        none @34 :Void;
127        some @35 :Entity;
128    }
129    shoulderEntityRight :union {
130        none @36 :Void;
131        some @37 :Entity;
132    }
133    seenCredits @38 :Bool;
134    recipeBook @39 :RecipeBook;
135}
136
137struct Players {
138    players @0 :List(Player);
139}