polyphony-chat / chorus

A Rust library for interacting with multiple Polyphony- and Spacebar-Compatible instances at once.
https://crates.io/crates/chorus
Mozilla Public License 2.0
16 stars 7 forks source link

Full wasm support with `wasm-bindgen-futures` #445

Closed bitfl0wer closed 9 months ago

bitfl0wer commented 9 months ago

This PR applies the necessary patches to correctly pass (all but two) tests when compiling for wasm32-unknown-unknown.

2 tests have been disabled for wasm at the moment: test messages::search_messages and test messages::send_message_attachment. These two tests currently rely on std::fs to grab a file to send/search for using chorus. This is not possible on wasm32-unknown, because this target does not have a Filesystem, and does not emulate on either. These two tests should be patched, but this should be good enough for now.