rust-bindgen
rust-bindgen copied to clipboard
Automatically generates Rust FFI bindings to C (and some C++) libraries.
I was trying to follow from where bindgen was pulling headers. I was suggested to pass the `-print-search-dirs` clang flag. Unfortunately, this simply caused bindgen to panic, with a very...
### Input C/C++ Header ```C++ #define FOO 4 #define BAR (1 + FOO) #undef FOO #define FOO 5 #define BAZ (1 + FOO) ``` ### Bindgen Invocation ``` $ bindgen...
This issue keeps track of all the `bindgen` issues related to preprocessing directives. The two most common reasons for these issues are the following: - `libclang` doesn't have a "good...
### Input C/C++ Header ```C++ class CThostFtdcMdSpi { public: virtual void OnFrontConnected(){}; virtual void OnFrontDisconnected(int nReason){}; virtual void OnHeartBeatWarning(int nTimeLapse){}; virtual void OnRspUserLogin(CThostFtdcRspUserLoginField *pRspUserLogin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)...
### Input C ```C struct Packet { long long x; float y; }; double frob(struct Packet packet);``` ```` ### Bindgen Invocation ````Rust bindgen::Builder::default() // The input header we would like...
### Input C/C++ Header Header ```C #include "AeronArchive.h" ``` the actual header can be found here https://github.com/real-logic/aeron/blob/1.41.4/aeron-archive/src/main/cpp/client/AeronArchive.h ### Bindgen Invocation bindgen code ```Rust println!("cargo:rerun-if-changed=build.rs"); println!("cargo:rerun-if-changed=bindings.h"); let aeron_path = canonicalize(Path::new("./aeron")).unwrap(); let...
Background: I am currently trying to build tflite-micro bindings for rust, as the previous ones are _very_ out of date (2-3 years out of date!). I am pulling from [this...
This commit adds the ability to create parent directories if they don't exist before writing a file in the write_to_file function. Additionally, an integration test has been changed to validate...
It is a common pattern to use the `git` repo of a dependency to try new features that have not been released yet. So it would be normal for users...
I want to build an interface between c++ and rust, but different errors occurred. ### Input C/C++ Header ```C++ #ifndef __TEST_HPP__ #define __TEST_HPP__ #include #include #include template class Config{ uint16_t...