Skip to content
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

Mention the bridges builder in the book #1319

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
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