Browse Source

Set allowlist to bindgen::Builder

tags/v0.2.5-alpha.2
Yuma Hiramatsu 4 years ago
parent
commit
d8bdc33667
2 changed files with 12 additions and 0 deletions
  1. +11
    -0
      rcl-sys/build.rs
  2. +1
    -0
      rcl-sys/src/wrapper.h

+ 11
- 0
rcl-sys/build.rs View File

@@ -27,6 +27,17 @@ fn main() {

let out_path = PathBuf::from(std::env::var("OUT_DIR").unwrap()).join("bindings.rs");
builder
.allowlist_type("rcl_.*")
.allowlist_type("rmw_.*")
.allowlist_type("rcutils_.*")
.allowlist_type("RCUTILS_.*")
.allowlist_function("rcl_.*")
.allowlist_function("rmw_.*")
.allowlist_function("rcutils_.*")
.allowlist_var("RCL_.*")
.allowlist_var("RMW_.*")
.allowlist_var("RCUTILS_.*")
.allowlist_var("g_rcutils_.*")
.generate()
.expect("Unable to generate bindings")
.write_to_file(out_path)


+ 1
- 0
rcl-sys/src/wrapper.h View File

@@ -1,3 +1,4 @@
#include <rcl/logging.h>
#include <rcl/logging_rosout.h>
#include <rcl/rcl.h>
#include <rmw/incompatible_qos_events_statuses.h>

Loading…
Cancel
Save