Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions book/src/extern-c++.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,18 @@ pub mod ffi {
}
```

If there are multiple bridge blocks within a crate, you need to include them in `build.rs` with a `bridges` builder

```rust,noplayground
// build.rs
fn main() {
cxx_build::bridges(["src/file1.rs", "src/file2.rs", ...])
.file("src/file1.cc")
.file("src/file2.cc")
...
}
```

#### Integrating with bindgen-generated or handwritten unsafe bindings

Handwritten `ExternType` impls make it possible to plug in a data structure
Expand Down