Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate libphx.lua #124

Closed
Tracked by #156
HaronK opened this issue Jun 24, 2023 · 0 comments · Fixed by #158
Closed
Tracked by #156

Automate libphx.lua #124

HaronK opened this issue Jun 24, 2023 · 0 comments · Fixed by #158
Labels
engine Any PR/Issue affiliated with the engine portion of LTR

Comments

@HaronK
Copy link
Contributor

HaronK commented Jun 24, 2023

There are several declarations in the engine/lib/phx/script/ffi/libphx.lua file that should be now manually added or updated when you change Rust code.

All this can be automated with proc macro generation.

Sections:

  1. Basic Typedefs - for non standard types (mostly enums or typedefs) we can put these declarations in their own generated *.lua files.
  2. Opaque Structs - those are impl blocks. Also can be automatically generated.
  3. libphx.Opaques - list of names of the opaque structures. Can be autogenerated.
  4. Transparent Structs - these ones mostly manual thing but theoretically can be also autogenerated (by adapting proc macro for structs).
  5. libphx.Structs - list of names of the transparent structures. Same as previous one.

After this all Lua bindings generation will be automatic (probably except transparent structures, but they should be rarely changed), so developers should not do any additional fixes manually.

This was referenced Oct 10, 2023
@HaronK HaronK added the engine Any PR/Issue affiliated with the engine portion of LTR label Oct 15, 2023
@HaronK HaronK linked a pull request Oct 16, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engine Any PR/Issue affiliated with the engine portion of LTR
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant