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

does not compile with --target wasm32-unknown-unknown #4

Open
amitu opened this issue Apr 27, 2024 · 1 comment · May be fixed by FifthTry/serde-sqlite-jsonb#1
Open

does not compile with --target wasm32-unknown-unknown #4

amitu opened this issue Apr 27, 2024 · 1 comment · May be fixed by FifthTry/serde-sqlite-jsonb#1

Comments

@amitu
Copy link

amitu commented Apr 27, 2024

error[E0308]: mismatched types
    --> /Users/amitu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serde_sqlite_jsonb-0.1.0/src/de.rs:103:34
     |
103  |             usize::from_be_bytes(buf)
     |             -------------------- ^^^ expected an array with a fixed size of 4 elements, found one with 8 elements
     |             |
     |             arguments to this function are incorrect
     |
note: associated function defined here

Code is using usize in a few places, but since the size of usize is not fixed we should convert it to use u64/u32 depending on what is expected based on sqlite jsonb encoding spec.

@amitu
Copy link
Author

amitu commented Apr 27, 2024

Have created PR in my private fork with changes that compile against wasm, and tests pass too. Would you be interested in this?

@amitu amitu linked a pull request Apr 27, 2024 that will close this issue
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 a pull request may close this issue.

1 participant