Comments (5)
Just a quick update: The vtables before were absolutely wrong anyway (didn't take into account destructors, etc.).
Also, MSVC packs virtual method overrides differently from the rest of the compilers, so this will require target-specific code (which is not a huge deal though, we already do it).
In any case, this is still a major amount of work, though certainly useful. I'll consider implementing it if there's enough need for it, though the logic is surely complex.
from rust-bindgen.
I was searching for information regarding this feature in bindgen. As I understand, it still has to be done as of may 2018. Is there any hope it will be considered at some point? Thanks
from rust-bindgen.
It's not really trivial, someone needs to go ahead and implement it properly, and add a bunch of tests. I'd be happy to mentor, though I'm not sure if I'd have the time to do it myself.
from rust-bindgen.
This is basically a matter of implementing this:
rust-bindgen/src/codegen/mod.rs
Lines 997 to 1018 in 91d9600
Which already has a reference to all methods and base classes. Making this work for simple casses (no base classes, no overloaded methods) should be trivial. From there we can improve.
from rust-bindgen.
Is this fixed via #2145?
from rust-bindgen.
Related Issues (20)
- aarch64 size_t mismatch HOT 1
- Bitfield type generates a `packed` and `aligned` structure HOT 1
- Support targets x86_64-pc-windows-msvc HOT 2
- Struct/union forward-declaration in a field definition gets misinterpreted as a definition HOT 1
- Can it be used for C# HOT 1
- Bindgen fails for GLIB 2.38 math.h on AArch64
- Subtract underflow when generating explicit paddings HOT 1
- [feature request] use native rust integer types for non-enums
- Functions that use vtables get `improper_ctypes` warning
- thread 'main' panicked at .... is not a valid Ident HOT 5
- Make `BINDGEN_EXTRA_CLANG_ARGS` work with `BINDGEN_EXTRA_CLANG_ARGS_<target>`
- Take input from standard input HOT 1
- Duplicate structs when declaring a struct using 'typedef struct' and using 'struct StructType' in function signature. HOT 3
- Is there a way to gen func type from c/cpp func declaration HOT 4
- Bindgen does not generate bindings for declarations in a `extern "C"` block HOT 4
- The API generated for objective-c categories is inconvenient and requires implementation knowledge HOT 1
- [feature request] Support Cstr literals HOT 3
- Cannot override integer type of constified enum module. HOT 4
- Clippy will warn on `use bindgen::CargoCallbacks;` regardless of the usage HOT 1
- Inappropriate generated type for function-returning-function HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust-bindgen.