Conversation
and but only for the `generate-static-ffi` call. It doesn't make sense for the mapped variant.
|
Neat, what does an example look like? |
|
As a small example, say you had the following header file: And you built it with: You end up with the generated file There are two major downsides (that I'm aware of) right now:
This is a problem because of the name mangling that P.S. I forgot to mention in the commit message, I added one additional thin in this PR, it derefs function pointers now, which greatly helps when importing an OOP C library...like CEF. https://github.com/cztomczak/cefcapi |
|
Oh, also, to address point 1, that would require using the LLVM/clang plugin to get struct field type names (instead of just their unqualified shapes), but I don't really know how to do that and don't have the bandwidth to look into it right now. |
|
Cool; I won't merge this, but maybe @dbenoit17 can give some advice or it will be a good checkpoint for future work |
|
Oh ya, sorry if that wasn't clear. I didn't open this PR because I think it should be merged as is. Its much more of a sketch that needs to be more fully fleshed out. :) |
This is more or a proof of concept PR than something entirely fleshed out.
Add two additional flags:
#:named-structs
and
#:prefix-definitions
but only for the
generate-static-fficall. It doesn't make sense forthe mapped variant.