fork/rust_serialization_benchmark
git clone https://git.julia.blue/fork/rust_serialization_benchmark
783c4dc
master
1namespace mk48; 2 3enum EntityType : byte { 4 ArleighBurke, 5 Bismarck, 6 Clemenceau, 7 Fletcher, 8 G5, 9 Iowa, 10 Kolkata, 11 Osa, 12 Yasen, 13 Zubr, 14} 15 16struct Vector2f { 17 x: float; 18 y: float; 19} 20 21struct Transform { 22 altitude: byte; 23 angle: ushort; 24 position: Vector2f; 25 velocity: short; 26} 27 28struct Guidance { 29 angle: ushort; 30 submerge: bool; 31 velocity: short; 32} 33 34table Contact { 35 damage: ubyte; 36 entity_id: uint; 37 entity_type: EntityType; 38 guidance: Guidance; 39 player_id: ushort; 40 reloads: [bool] (required); 41 transform: Transform; 42 turret_angles: [ushort] (required); 43} 44 45struct ChunkId { 46 x: byte; 47 y: byte; 48} 49 50table TerrainUpdate { 51 chunk_id: ChunkId; 52 data: [ubyte]; 53} 54 55table Update { 56 contacts: [Contact] (required); 57 score: uint; 58 world_radius: float; 59 terrain_updates: [TerrainUpdate] (required); 60} 61 62table Updates { 63 updates: [Update] (required); 64}