Skip to content

Conversation

@VirxEC
Copy link
Collaborator

@VirxEC VirxEC commented Jun 29, 2025

Some syntax changes have been made.

  • Unions have been collapsed into their parent, so no more .item
image
  • The Float type no longer exists. PyFloat gets stored until .pack() is called, at which point the flat::Float is constructed automatically. This only applies to the state setting code where Float was used:
- dgs.match_info.game_speed.val += 1
+ dgs.match_info.game_speed += 1
- dgs.match_info.world_gravity_z = Float(-650)
+ dgs.match_info.world_gravity_z = -650

Non-forward facing changes:

Planus, a Rust implementation of the flatbuffers compiler with an emphasis on generating high-quality Rust code, is now used. The intermediate representation of the flatbuffers spec is used by the codegen script to generate the additional Python code, which is now ran through cargo fmt before being written to the disk.

The use of Planus's IR of the flatbuffers spec provides ergonomic access to all the data in a manor that's been heavily tested and verified against lots of inputs vs the old, custom sudo-parser.

@VirxEC VirxEC linked an issue Jul 8, 2025 that may be closed by this pull request
@VirxEC VirxEC added the enhancement New feature or request label Jul 8, 2025
@VirxEC VirxEC marked this pull request as ready for review September 14, 2025 04:21
Copy link
Contributor

@NicEastvillage NicEastvillage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good changes 👍

@VirxEC VirxEC merged commit f22348d into master Sep 14, 2025
4 checks passed
@VirxEC VirxEC deleted the planus branch September 14, 2025 21:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use planus for codegen

2 participants