In other C files I've seen things like:
#ifdef __cplusplus
extern "C" {
#endif
void hello_world(char *greeting);
#ifdef __cplusplus
}
#endif
Example: https://github.com/xiallc/PixieSDK/blob/master/sdk/include/pixie16/pixie16.h
Maybe cbindgen could do that?