Hi, I was trying to develop a native C interop library in F#.
I wonder if there is a way to leverage F# type provider to read that C library header file, parse it and use the AST to generate the boilerplate binding code.
I read several type provider projects code, but there still things unclear to me, specifically the following:
- How to mark a
ProvidedMethod
asextern
? - How to generate a plain struct (value type) with
StructLayout(LayoutKind.Explicit)
attributes?
I don’t know if that is possible? Please give any suggestion to me, thanks!