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

fix bindgen issue with WASM builds #433

Merged
merged 1 commit into from
Feb 24, 2025

Conversation

samansmink
Copy link
Collaborator

@samansmink samansmink commented Feb 12, 2025

Without this fix, the generated bindgen code causes problems in wasm like:

error[E0080]: evaluation of constant value failed
   --> /Users/sam/Development/extension-template-rs/target/wasm32-unknown-emscripten/release/build/libduckdb-sys-9ac58d9f4f249afb/out/bindgen.rs:633:46
    |
633 |     ["Size of _duckdb_extracted_statements"][::std::mem::size_of::<_duckdb_extracted_statements>() - 8usize];
    |                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempt to compute `4_usize - 8_usize`, which would overflow

error[E0080]: evaluation of constant value failed
   --> /Users/sam/Development/extension-template-rs/target/wasm32-unknown-emscripten/release/build/libduckdb-sys-9ac58d9f4f249afb/out/bindgen.rs:648:40
    |
648 |     ["Size of _duckdb_pending_result"][::std::mem::size_of::<_duckdb_pending_result>() - 8usize];
    |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempt to compute `4_usize - 8_usize`, which would overflow

@Maxxen
Copy link
Member

Maxxen commented Feb 24, 2025

@samansmink should this still be merged?

@samansmink
Copy link
Collaborator Author

Yea if you agree with it, I think this is good to go

@Maxxen Maxxen merged commit 904d7fa into duckdb:main Feb 24, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants