- 
                Notifications
    
You must be signed in to change notification settings  - Fork 5.2k
 
Open
Milestone
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 structs. 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).
0xF6, antoinebj, dp-sgr, ni4, miroljub1995 and 2 more
Metadata
Metadata
Assignees
Type
Projects
Status
No status