f3d-app / f3d

Fast and minimalist 3D viewer.
https://f3d.app
BSD 3-Clause "New" or "Revised" License
2.78k stars 203 forks source link

Add C bindings for the libf3d #1307

Open mwestphal opened 6 months ago

mwestphal commented 6 months ago

Is your feature request related to a problem? Please describe. Currently, the libf3d has a C++11 API and provides bindings in python and javascript (experimental).

Providing C bindings would open libf3d usage to many other languages, especially Julia and Rust.

Let's see if there is an interest for this. If you have interest, please do not hesitate to comment on this issue.

kidharb commented 6 months ago

@mwestphal please assign this to me

Meakk commented 6 months ago

Here's my opinion on this topic:

We should add the bindings directly in the public headers where it's appropriate, it should look like:

#ifdef __cplusplus

/* C++ class definition here*/

extern "C" {
#endif

/* C bindings definition here*/

#ifdef __cplusplus
}
#endif
parkerstafford commented 6 months ago

I'll work on this!

mwestphal commented 5 months ago

Need any help @parkerstafford ? :)

mwestphal commented 2 months ago

Hey @parkerstafford , need any help moving forward ?

mwestphal commented 3 weeks ago

first version here: https://github.com/f3d-app/f3d/pull/1444