cbindgen
cbindgen copied to clipboard
Modules inside cfg_if! macros aren't read / expanded (was: The C header file cannot be generated correctly.)
The c header file cannot be generated correctly. This is my project.
I entered the project root directory and entered the command cbindgen -l c, and got the following output.
I did not see the expected function prototype socks_hub_run and so on.
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
emm, I have found the reason, it's about cfg_if::cfg_if! macro. when I remove it, cbindgen works fine.
can you fix it as a bug?
There's the cargo expand feature that should work, right?