-
Notifications
You must be signed in to change notification settings - Fork 2
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
First working C Implementation #1
base: master
Are you sure you want to change the base?
Conversation
@DarkShadow44 Great to see! Also it might a good idea to For more details see: If you don't want to generate your 'export header' automatically (e.g., in CMake with (then just use Happy to contribute the patch just say the word |
Well, the entire runtime isn't designed to be used as a shared library in the first place. It's meant to be simply included as a single c file into the project. That's also why the header has special logic to handle dependencies and "configuring" the runtime. Not sure if the visibility really matters in such circumstances? Btw, I'm not 100% happy with how I currently handle KS_DEPEND_ON_INTERNALS, so I might rework that to have a proper interface, then only the runtime kaitaistruct.c would have access to internal structs and such. |
@DarkShadow44 Interesting. My interest is on the FFI side. Namely I'm thinking that once this is ported, then the number of supported languages grows from not 11 to 12, but from 11 to 50+. (I'm working on a new C compiler and associated tooling to take C libraries + headers and generate packages in dozens of different languages—using language-ecosystem recommended tooling—and release to their various app stores [e.g., Rust I don't want to translate things out of this C header that don't make sense when other languages are calling into it. |
Well, I separated the functions into functions that are needed by the program and functions needed by the generated code only. I could potentially separate this into two headers, if that makes sense? |
What is the timeline for this being merged and released so it can be used? |
Tests: kaitai-io/kaitai_struct_tests#97
Compiler: kaitai-io/kaitai_struct_compiler#253