Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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