10BC0 Avoid `std.meta.Tuple` by robbielyman · Pull Request #176 · natecraddock/ziglua · GitHub
[go: up one dir, main page]

Skip to content

Conversation

robbielyman
Copy link
Collaborator

Recent Zig changes around anonymous struct types also seem potentially relevant as reasons to avoid over-instantiating tuple types?

These functions rely (lightly) on Zig's comptime to minimize some of the
annoying overhead of writing `@intCast` and `@floatCast` all the time by
making those builtins part of the function definition. However, since
those builtins assert in builds with runtime safety enabled, these
functions will crash the program if called with bad Lua input. More
discussion is warranted about the tradeoffs of going this route before
merging.

Resolves #172.
Redoing the argument parsing in `TypeOfWrap` and `wrap` seems bad.
Also doing the compiler's job (providing compile errors) by hand seems
bad. This PR reverses courses on both of these choices.
@robbielyman robbielyman closed this Sep 3, 2025
@robbielyman robbielyman deleted the push-rssnvtoykzuo branch September 3, 2025 00:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0