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

Generate miniz.h with cbindgen for C export automatically #60

Open
oyvindln opened this issue Oct 1, 2019 · 0 comments
Open

Generate miniz.h with cbindgen for C export automatically #60

oyvindln opened this issue Oct 1, 2019 · 0 comments

Comments

@oyvindln
Copy link
Collaborator

oyvindln commented Oct 1, 2019

The internal compressor/decompressor structs do not match the layout of the C versions, so we want to generate headers with the correct layout rather than using the C headers for the original library. The C zip tests/functions segfault at the moment as the decompressor structure is put on the stack, and the init function in C is just a macro that zeroes a value.

CBindgen currently doesn't handle function pointers and boxes inside options (Whcih can be exported to c as pointers). Need to either be fixed upstream, or we will want to use raw pointers here which means a bit more unsafety.

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

No branches or pull requests

1 participant