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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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

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.

1 participant