3 ms·
But... that's what bindgen is for. Which I mentioned. I said it "can be quite simple"; for simple use cases, just using extern and translating the declarations
by lambda 2y ago
But... that's what bindgen is for. Which I mentioned.
I said it "can be quite simple"; for simple use cases, just using extern and translating the declarations by hand is perfectly viable.
For more complex cases, you use bindgen.
- varjag 2y agoBindings generators exist in most other languages with same limitations. I would love to see how bindgen would handle a function call defined as a preprocessor macro that I mentioned. Because most likely it won't.