JonasKruckenberg / tauri-sys

Bindings to the Tauri API for projects using wasm-bindgen
Apache License 2.0
84 stars 21 forks source link

Dependency on `wasm-bindgen` feature `serde_json` can cause circular dependency #52

Open bicarlsen opened 3 months ago

bicarlsen commented 3 months ago

Currently the crate depends on wasm-bindgen = { version = "0.2.89", features = ["serde_json"] } which can cause a circular dependency as described in aHash and getrandom, and discussed further in wasm-bindgen.

I removed this feature dependency and played with the crate a bit, and everything still seems to work.

Reproduction

I ran into this issue when trying to incorporate SurrealDB into my Tauri app.

Including both surrealdb and tauri-sys caused the issue.

Patched branch

https://github.com/bicarlsen/tauri-sys/tree/fix/wasm_bindgen_serde

emirror-de commented 3 months ago

I ran into the same situation and can confirm that your patched branch works for me too. It would be awesome to get this integrated.

Alex222222222222 commented 2 months ago

I also ran into the same issue when I enable the feature serde-serialize of wasm-bindgen.

Removed the feature also works for me.