servo / pathfinder

A fast, practical GPU rasterizer for fonts and vector graphics
Apache License 2.0
3.56k stars 198 forks source link

cbindgen is not making use of cfg directives because of lack of [defines] section in cbindgen.toml #422

Closed ghost closed 4 years ago

ghost commented 4 years ago

The header file generated with cbindgen will automatically wrap the various exported functions in c preprocessor macros, but only if those macros are defined in the cbindgen.toml under a [defines] section.

For example, on my windows machine, the functions labeled for MacOS only are still included leading to undefined references when compiling.

More information about this can be found here.