-
Notifications
You must be signed in to change notification settings - Fork 74
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
ffi #22
Comments
Thanks for looking into this! This is also the approach https://github.com/EmbarkStudios/physx-rs uses. Out of curiosity, why clang-ast over using libclang directly? https://github.com/KyleMayes/clang-rs I'll have a closer look at it during Christmas, but this is promising ❤️ |
I tried to use bindgen/cbindgen or cxx to build FFI APIs for rust, but found it's hard to(or impossible) build unreal source code for all these 3rd-plugin based on LLVM(or clang).So I have to find another way, try not to build unreal source code, but only parse the Header AST and extract the APIs and Objects we needed. |
Hi MaikKlein.
I've tried to use cxx to build FFI wrappers, but I found this way is almost on the opposite way to bind ue apis to rust.
Then I tried another way, using clang ast-dump tool to find "all" the "Runtime/" headers, then export all(maybe) these safe apis and generate FFI bind wrappers from cpp and rust. But it's still very experimental.
I'm unreal newer, but do not like to build or develop a game using c++.Hope this will give you some help.
Blow are the examples:
rust side:
cpp side Rigister:
cpp side Binder:
The project url is https://github.com/DrYaling/UnrealObject2RustBuilder.git
The text was updated successfully, but these errors were encountered: