bson-rust icon indicating copy to clipboard operation
bson-rust copied to clipboard

RUST-1130 Version `2.1.0` silently broke `wasm` builds with `uuid`

Open ilslv opened this issue 3 years ago • 3 comments

Version 2.1.0 enables uuids v4 feature, which seems to be a breaking change, as juniper wasm build began failing today.

ilslv avatar Dec 15 '21 07:12 ilslv

Hi @ilslv, thanks for reporting this issue! I can confirm that, by default, bson 2.1.0 doesn't build on wasm. It does appear that downstream crates can work around this for now by adding an explicit dependency on uuid with the wasm-bindgen feature flag enabled. I've also filed RUST-1130 to discuss with the team options for improving this on our end. Please let me know if the workaround works for you or if you have any more questions, thanks!

patrickfreed avatar Dec 15 '21 16:12 patrickfreed

Thanks for the workaround! Maybe we can add wasm-bindgen feature for uuid based on target right in this repo and also add wasm build on the CI? I'll be happy to contribute this.

ilslv avatar Dec 16 '21 05:12 ilslv

Yeah, we plan on doing something like that, and thanks for offering to contribute those changes @ilslv! Since our CI system is built in-house and is somewhat tricky to configure, we usually handle doing stuff like that ourselves though. That said, we plan to get to RUST-1130 sometime over the next quarter, so stay tuned for updates! In the meantime, I hope the above workaround works sufficiently well.

patrickfreed avatar Feb 22 '22 22:02 patrickfreed