fork/rust_serialization_benchmark

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

David KoloskiInitial bebop support, improve flatc build2940c3e

bebop
2.0 KiB112 linesraw
1enum GameType {
2    SURVIVAL = 0;
3    CREATIVE = 1;
4    ADVENTURE = 2;
5    SPECTATOR = 3;
6}
7
8struct Item {
9    int32 count;
10    uint32 slot;
11    string id;
12}
13
14struct Abilities {
15    float32 walk_speed;
16    float32 fly_speed;
17    bool may_fly;
18    bool flying;
19    bool invulnerable;
20    bool may_build;
21    bool instabuild;
22}
23
24struct Vector3d {
25    float64 x;
26    float64 y;
27    float64 z;
28}
29
30struct Vector2f {
31    float32 x;
32    float32 y;
33}
34
35struct Uuid {
36    uint32 x0;
37    uint32 x1;
38    uint32 x2;
39    uint32 x3;
40}
41
42struct Entity {
43    string id;
44    Vector3d pos;
45    Vector3d motion;
46    Vector2f rotation;
47    float32 fall_distance;
48    uint32 fire;
49    uint32 air;
50    bool on_ground;
51    bool no_gravity;
52    bool invulnerable;
53    int32 portal_cooldown;
54    Uuid uuid;
55    string custom_name;
56    bool custom_name_visible;
57    bool silent;
58    bool glowing;
59}
60
61struct RecipeBook {
62    string[] recipes;
63    string[] to_be_displayed;
64    bool is_filtering_craftable;
65    bool is_gui_open;
66    bool is_furnace_filtering_craftable;
67    bool is_furnace_gui_open;
68    bool is_blasting_furnace_filtering_craftable;
69    bool is_blasting_furnace_gui_open;
70    bool is_smoker_filtering_craftable;
71    bool is_smoker_gui_open;
72}
73
74struct Vehicle {
75    Uuid uuid;
76    Entity entity;
77}
78
79struct Player {
80    GameType game_type;
81    GameType previous_game_type;
82    uint64 sore;
83    string dimension;
84    uint32 selected_item_slot;
85    Item selected_item;
86    string spawn_dimension;
87    int64 spawn_x;
88    int64 spawn_y;
89    int64 spawn_z;
90    bool spawn_forced;
91    uint32 sleep_timer;
92    float32 food_exhaustion_level;
93    float32 food_saturation_level;
94    uint32 food_tick_timer;
95    uint32 xp_level;
96    float32 xp_p;
97    int32 xp_total;
98    int32 xp_seed;
99    Item[] inventory;
100    Item[] ender_items;
101    Abilities abilities;
102    Vector3d entered_nether_position;
103    Vehicle root_vehicle;
104    Entity shoulder_entity_left;
105    Entity shoulder_entity_right;
106    bool seen_credits;
107    RecipeBook recipe_book;
108}
109
110struct Players {
111    Player[] players_;
112}