HomePhabricator
Diffusion Comm 2dce5a391b66

[backup-client] Compile to wasm

Description

[backup-client] Compile to wasm

Summary:
Compiles backup client to WASM for web. Uses a similar approach to SQliteQueryExecutor where we keep the files inside of the git repository.

  • tokio-tungstenite-wam allows us to have one API for native (tungstenite) and web websockets. It has very similar API to tungstenite but required a few small changes that I will annotate
  • web.rs contains a wasm-only file providing JS<->Rust conversions and helpers
  • A few structs got either serde implementations or conditional wasm_bindgen attributes so that they are available in JS or can be deserialized as arguments from JS

Adding @ashoat as reviewer because of dependency changes.

Depends on D11040

Test Plan:

  • Check that native still compiles (both Android and iOS)
  • Check that compiling to WASM works (yarn build)
  • Testing that backup client in WASM works is tested in the future diffs

Reviewers: marcin, bartek, kamil, ashoat

Reviewed By: kamil, ashoat

Subscribers: atul, tomek, ashoat

Differential Revision: https://phab.comm.dev/D11041

Details

Provenance
Michal Gniadek <michal.gniadek@swmansion.com>Authored on Feb 23 2024, 9:17 AM
Reviewer
kamil
Differential Revision
D11041: [backup-client] Compile to wasm
Parents
rCOMMc8e717c71b56: [web] Fix non-readonly types
Branches
Unknown
Tags
Unknown

Event Timeline

Michal Gniadek <michal.gniadek@swmansion.com> committed rCOMM2dce5a391b66: [backup-client] Compile to wasm (authored by Michal Gniadek <michal.gniadek@swmansion.com>).Mar 6 2024, 6:08 AM