Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add C bindings for the libf3d #1307

Open
mwestphal opened this issue Mar 9, 2024 · 6 comments
Open

Add C bindings for the libf3d #1307

mwestphal opened this issue Mar 9, 2024 · 6 comments
Labels
help wanted Please help with this issue! source:libf3d
Milestone

Comments

@mwestphal
Copy link
Contributor

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
Copy link
Contributor

kidharb commented Mar 16, 2024

@mwestphal please assign this to me

@Meakk
Copy link
Member

Meakk commented Mar 16, 2024

Here's my opinion on this topic:

  • Functions of the form instance.function(arg1, arg2) should look like function(instance, arg1, arg2)
  • Return references should become argument pointers
  • Returned std::vector should become int* size and T* ptr arguments

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

@mwestphal mwestphal moved this from Discuss to Investigate in F3D Mar 16, 2024
@parkerstafford
Copy link

parkerstafford commented Mar 31, 2024

I'll work on this!

@mwestphal mwestphal added this to the 2.5.0 milestone Apr 4, 2024
@mwestphal mwestphal moved this from Investigate to To do in F3D Apr 4, 2024
@mwestphal
Copy link
Contributor Author

Need any help @parkerstafford ? :)

@mwestphal mwestphal moved this from To do to In progress in F3D May 1, 2024
@mwestphal mwestphal modified the milestones: 2.5.0, 3.0.0 Jul 3, 2024
@mwestphal mwestphal modified the milestones: 3.0.0, 3.1.0 Jul 13, 2024
@mwestphal
Copy link
Contributor Author

Hey @parkerstafford , need any help moving forward ?

@mwestphal
Copy link
Contributor Author

first version here: #1444

@Meakk Meakk mentioned this issue Jan 7, 2025
3 tasks
@mwestphal mwestphal moved this from In progress to To do in F3D Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Please help with this issue! source:libf3d
Projects
Status: To do
Development

No branches or pull requests

4 participants