cbindgen icon indicating copy to clipboard operation
cbindgen copied to clipboard

Macro generated functions are ignored in header generation

Open dmulder opened this issue 8 months ago • 2 comments

I have several functions which are relevant to multiple objects, so I created some macros to reduce code duplication. When I generate the header file, the generated functions are excluded from the header file. I can see the symbols are present in the generated shared object library.

I read somewhere that I needed to set [parse.expand] crates in my cbindgen.toml in order to pre-process the sources to generate the header correctly. I tried this, and it made no difference at all.

I'm using cargo cbuild to wrap cbindgen, but the same happens manually calling cbindgen.

You can see the sources here: https://gitlab.com/davidmmulder/libhimmelblau/-/tree/dmulder/serialize_deserialize?ref_type=heads

dmulder avatar Jun 12 '24 17:06 dmulder