mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-06 23:15:08 -04:00
Why? Because `napi` and `wasm-bindgen` are too different. At this step, the most notable bugs are the way `napi` is handling its proc macros. There is too much conflicts when used with `#[cfg_attr]`. It makes the code repetitive and harder to read and to understand (and also to compile, we must be very careful). But on the short-term, quickly, we will see more notable differences between `wasm-bindgen` and `napi`, e.g. with array (in `wasm-bindgen`, we can downcast array items into particular types, with `napi` it's going to be a very different code). Instead of fighting the proc macros bugs now, and having to split the code later inside the same crate, we believe it's a good idea to split the code now into 2 crates. At first we will see obvious code duplications, but on the short-term, the code is likely to be more and more different.