Skip to content

Commit

Permalink
compile xmtp_id and xmtp_mls to wasm32 (#1026)
Browse files Browse the repository at this point in the history
* compile xmtp_id and xmtp_mls to wasm32

* remove `native` features

* remove unsafe & dup trait

* annotate all tests with wasm-bindgen-test for wasm32

* xmtp_mls tests compile for wasm32

* dont create a new file for database in wasm32

* fix compile for bindings_wasm

* pin to wasm-bindgen 0.2.92

* fix wasm-bindgen-test version
  • Loading branch information
insipx authored Sep 5, 2024
1 parent 9f5b365 commit acbe841
Show file tree
Hide file tree
Showing 72 changed files with 1,532 additions and 1,001 deletions.
289 changes: 195 additions & 94 deletions Cargo.lock

Large diffs are not rendered by default.

19 changes: 18 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,27 @@ tokio = { version = "1.35.1", default-features = false }
tonic = "^0.12"
tracing = { version = "0.1" }
tracing-subscriber = "0.3"
url = "2.5.0"
diesel = { version = "2.2", default-features = false }
diesel-wasm-sqlite = "0.0.1"
diesel_migrations = { version = "2.2", default-features = false }
wasm-bindgen-test = "0.3.42"
gloo-timers = "0.3"

# Internal Crate Dependencies
xmtp_cryptography = { path = "xmtp_cryptography" }
xmtp_id = { path = "xmtp_id" }
xmtp_mls = { path = "xmtp_mls" }
xmtp_proto = { path = "xmtp_proto" }

[profile.release]
opt-level = "s"

# patch needed until some items
# are made public for third-party dependencies: https://github.com/diesel-rs/diesel/pull/4236
# (cfg-specific patche support does not exist)
[patch.crates-io]
diesel = { git = "https://github.com/xmtp/diesel", branch = "insipx/sqlite-replace-ignore-pub" }
diesel_derives = { git = "https://github.com/xmtp/diesel", branch = "insipx/sqlite-replace-ignore-pub" }
diesel_migrations = { git = "https://github.com/xmtp/diesel", branch = "insipx/sqlite-replace-ignore-pub" }
diesel-wasm-sqlite = { path = "./diesel-wasm-sqlite" }

Loading

0 comments on commit acbe841

Please sign in to comment.