- 
 
- 
  Notifications
 You must be signed in to change notification settings 
- Fork 189
Added a ToLua derive macro #427
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
Conversation
I updated it to implement UserData instead of IntoLua, this works more cleanly with passing the type in and out of lua, it will use copy on rust primitives, otherwise it will clone. It could probably be updated to include field annotations of some kind in order to be more customizable and efficient. It currently creates a simple getter and setter for all the struct fields.
Added a ToLuaTable and FromLuaTable macro, this essentially, in a way, allows you serialize and deserialize Lua tables to and from rust types.
9cbb029 to
 91fe02d  
 Compare
 
 This would be a fantastic addition, are there any major blockers that must be addressed for this PR? I volunteer to help out if need be :)
Uh oh!
There was an error while loading. Please reload this page.
I just made it but it seems useful so far, at least for me it is, works with most primitives so I think it's worth adding to help reduce boilerplate: