-
Notifications
You must be signed in to change notification settings - Fork 40
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
Add Lua language support. #177
base: master
Are you sure you want to change the base?
Conversation
1e3d31c
to
dfe2951
Compare
@danielhenrymantilla could you please give this pull request a review? We at Cloudflare are looking forward to your feedback. Thanks! |
54cb34f
to
96530c3
Compare
Wow, thanks for the PR! Will look into this in a few days, hopefully (feel free to ping me should I forget to do so). There is still a bit of tech debt in |
96530c3
to
218ceb5
Compare
@danielhenrymantilla Thanks for considering the PR! I followed existing patterns with A git dependency is a temporary solution for one repository at Cloudflare, but we're planning to adapt this pattern across more repositories and services. So getting this merged and released would be great. We're looking forward to it and hope we can move on this soon. Thanks again! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
High level review, I am not familiar with safer-ffi
.
218ceb5
to
89a8c7b
Compare
@danielhenrymantilla any chance you could have a look at this PR? I'd appreciate any suggestions or feedback on it. Thanks! |
89a8c7b
to
9bcad86
Compare
Hey @danielhenrymantilla! I've updated PR and resolved conflicts with fresh |
Friendly bump @danielhenrymantilla 👀 |
Hey @danielhenrymantilla, is there's anything else we can help with to get this PR to a mergeable state? Thanks! |
I'd also be interested in this! @danielhenrymantilla |
Any update on this? |
Lua FFI has a few notable differrences from regular generated C headers: * Custom prelude/epilogue with `ffi.cdef` directive. * Constants defined using `static const` syntax instead of `#define`. * Different comments format using `--` or `[[` instead of `/* */`. * Doesn't support `#include`, `#ifdef` or other macros. Lua FFI described in more details at http://luajit.org/ext_ffi.html Other changes: * Added const generics support for the structs. * Added implementation for array of any const size `N`. * Added `try_as_str` implementation for `str_ref` and `slice_ref<u8>`.
9bcad86
to
43c8a72
Compare
Lua FFI has a few notable differrences from regular generated C headers:
ffi.cdef
directive.static const
syntax instead of#define
.--
or[[
instead of/* */
.#include
,#ifdef
or other macros.Lua FFI described in more details at http://luajit.org/ext_ffi.html
Other changes:
N
.try_as_str
implementation forstr_ref
.