Ferop is a F# library that generates PInvoke methods and compiles inline C based on an assembly using conventions. This is highly experimental and rapidly changing.