Open
Description
Methods decorated with [UnmanagedCallersOnly(EntryPoint="export-name")]
end up as exported symbols in published binary. Since ILC has all the required info related to method signatures and beyond, it can generate a plain C header file {outputFileName}.h
with exported APIs accurately for user convenience.
The main work it entails is C# to C type mapping (int
->int32_t
etc. with inttypes.h
, stdbool.h
includes), generating enums and generating complex object graphs representation in terms of struct
s. This feature can be enabled behind an optional project property <GenerateCHeaderFile>true
. Further customization may not required and ilc can be opinionated about the style choice (e.g. all definitions stuffed in one header file).
Metadata
Metadata
Assignees
Type
Projects
Status
No status