mcneel / rhino3dm

Libraries based on OpenNURBS with a RhinoCommon style
MIT License
613 stars 139 forks source link

C API for easier third-party bindings #484

Open NeusFear opened 2 years ago

NeusFear commented 2 years ago

Maintaining a C API would make creating a third party bindings easier for users.

It would be unreasonable for us to request things like "add a Java API" or something along those lines, but if you added a C API we could use JNI to bind to the C API ourselves with relative ease. Bindings not limited to just Java obviously, there are many other languages that allow binding to C very simply.

I realize that the community guidelines say that we are supposed to use the YouTrack, but when attempting to do that I get an error saying that there are no more seats available. So I am resorting to here,

sbaer commented 2 years ago

There actually is a large C API in place as this is what the .NET bindings use for pInvokes. This can be found in the librhino3dm_native directory.

How can we make this easier for people to use for access from other languages?

NeusFear commented 2 years ago

To us in the LWJGL (lightweight java game library) community it seems like the C headers are not all inclusive. I'm not sure if this is because the C# bindings may be generated from the C++ api or something similar, but essentially we would need headers for the full library in C to be able to bind to it with JNI.