-
Notifications
You must be signed in to change notification settings - Fork 42
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
Ways to automate this? #83
Comments
I'm sorry it's a very late reply, I found this today. Also sorry if it could look spam, but maybe it's what you are looking, @IngwiePhoenix: opaque-pointer crate. The crate has tests and is documented. It exposes generic functions. Of course, almost functions are unsafe. It's what I use when I need create a static library to be used from C/C++ (and also cbindgen crate). |
Thank you for the ping! Yeah I was not expecting that. But still appreciate it nevertheless. I'll check it out later. Merry christmas btw. :) |
Any updates on this? I have some ideas for automating this, but would like to see if anyone has also been doing something of this sort. |
Sorry in advance if it's not the place to talk about it. @GandelXIV could you explain the ideas for automating this? I was thinking about a derive trait. |
My idea was rather making a CLI tool that would generate C bindings and headers for a givens crate public mumbers. This way, anyone could just pull a library from crates.io and integrate it into their project. |
Looking at the objects example, I see that most of those functions are actually very generic as they simply check if the arguments passed are
NULL
or not. So would it be possible to automatically wrap a struct and implementation like this?(Mind you, I am new to rust and come from c/c++...)
The text was updated successfully, but these errors were encountered: