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

Add comment around opaque types. #1458

Merged
merged 1 commit into from
Feb 27, 2025
Merged
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 engine/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,18 @@ impl IncludeCppEngine {
}
}

// At this point it woul be great to use `Builder::opaque_type` for
// everything which is on the allowlist but not on the POD list.
// This would free us from a large proportion of bindgen bugs which
// are dealing with obscure templated types. Unfortunately, even
// for types which we expose to the user as opaque (non-POD), autocxx
// internally still cares about seeing what fields they've got because
// we make decisions about implicit constructors on that basis.
// So, for now, we can't do that. Perhaps in future bindgen could
// gain an option to generate any implicit constructors, if that
// information is exposed by clang. That would remove a lot of
// autocxx complexity and would allow us to request opaque types.

log::info!(
"Bindgen flags would be: {}",
builder
Expand Down
Loading