Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wasm Feature Branch #959

Merged
merged 119 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
119 commits
Select commit Hold shift + click to select a range
68e71a8
bare minimum wasm sqlite backend (#905)
insipx Aug 14, 2024
d7e509c
Statement Stream for AsyncConnection::Load (#961)
insipx Aug 15, 2024
6a636ce
Insertion ORM w/ prepared statements works (#966)
insipx Aug 22, 2024
87dd959
Merge branch 'main' of github.com:xmtp/libxmtp into wasm-backend
insipx Aug 22, 2024
f1274c0
Use sqlite.org/sqlite, revert to sync api (#988)
insipx Aug 26, 2024
44a8839
fix branch in readme
insipx Aug 26, 2024
d43b891
Organize wasm tests (#995)
insipx Aug 26, 2024
bb18b61
add metadata for crates
insipx Aug 27, 2024
f2cc495
fix vscode configuration for backend
insipx Aug 30, 2024
deb6fc9
docs.rs should only compile docs for wasm32
insipx Sep 1, 2024
a33d4b8
returning clauses for sqlite
insipx Sep 3, 2024
3f4f2f5
use xmtp diesel
insipx Sep 3, 2024
c12ae27
fix insert and ignore
insipx Sep 3, 2024
f2d0208
fix bind blob
insipx Sep 3, 2024
7b2e353
try to repro last compiler error
insipx Sep 3, 2024
0d64420
UpdateAndFetchResults
insipx Sep 4, 2024
cf71940
remove unused
insipx Sep 4, 2024
bb8536b
Last few backend impls (#1030)
insipx Sep 4, 2024
05ab48f
Merge branch 'wasm-backend' of github.com:xmtp/libxmtp into wasm-backend
insipx Sep 4, 2024
9f4ffe4
use exact wasm-bindgen version
insipx Sep 4, 2024
9f5b365
Merge branch 'main' of github.com:xmtp/libxmtp into wasm-backend
insipx Sep 4, 2024
acbe841
compile `xmtp_id` and `xmtp_mls` to wasm32 (#1026)
insipx Sep 5, 2024
7c0e18d
stack-based streams all the way down
insipx Sep 6, 2024
23393e3
dont use mem::swap
insipx Sep 6, 2024
724f72d
Merge branch 'main' of github.com:xmtp/libxmtp into insipx/pull-impro…
insipx Sep 6, 2024
4854f7a
turn Stream into a real type for mockall
insipx Sep 6, 2024
82c45f4
async fn in trait works well
insipx Sep 6, 2024
cb10a09
fix http
insipx Sep 6, 2024
c01938b
fix wasm
insipx Sep 6, 2024
2609d0b
more tests passing
insipx Sep 6, 2024
13346e5
fix build
insipx Sep 6, 2024
fe6a665
Allocate queries in wasm space to skip JS space copy
codabrink Sep 12, 2024
6099976
Allocate sql queries in wasm memory space (#1059)
codabrink Sep 12, 2024
a3068ec
added ser and deser for diesel-wasm-sqlite
vking45 Aug 31, 2024
acc8798
Merge branch 'main' of github.com:xmtp/libxmtp into wasm-backend
insipx Sep 12, 2024
8da66b9
Merge branch 'wasm-backend' of github.com:xmtp/libxmtp into wasm-backend
insipx Sep 12, 2024
86c1b01
make updates to serialize and deserialize functions
codabrink Sep 13, 2024
1c991ee
wip
codabrink Sep 13, 2024
6fa253a
prettier
codabrink Sep 13, 2024
c7f4b0a
passing tests
codabrink Sep 13, 2024
4541a21
working on freeing the value
codabrink Sep 13, 2024
b2403e5
cleanup
codabrink Sep 16, 2024
a11e186
free memory after serialization
codabrink Sep 16, 2024
f1e85c4
Merge branch 'wasm-backend' into coda/diesel-serialize-deserialize
codabrink Sep 16, 2024
65eb1bd
WASM Diesel Serialize/Deserialize (#1060)
codabrink Sep 16, 2024
9a5cd7a
Dont use r2d2 for WebAssembly (#1065)
insipx Sep 20, 2024
baf3988
Merge branch 'main' of github.com:xmtp/libxmtp into wasm-backend
insipx Sep 20, 2024
9987ac7
fix bindings_wasm build
insipx Sep 20, 2024
4c44607
add bindings_wasm Cargo.lock to git
insipx Sep 20, 2024
49444aa
wasm debug WIP
insipx Sep 24, 2024
fc28a48
init tracing for wasm
insipx Sep 25, 2024
bed2c81
fix tests
insipx Sep 30, 2024
895baf9
Merge branch 'main' of github.com:xmtp/libxmtp into insipx/wasm-debug…
insipx Sep 30, 2024
7adbb97
fix bindings_ffi build
insipx Sep 30, 2024
9f4e45f
fmt
insipx Sep 30, 2024
895ec4a
Fix WASM tests (138/151) (#1100)
insipx Oct 2, 2024
75725b3
remove diesel-wasm-sqlite crate, use git repo
insipx Oct 2, 2024
34770d4
remove wasm-backend workflow
insipx Oct 2, 2024
dc3272a
Merge branch 'main' of github.com:xmtp/libxmtp into wasm-backend
insipx Oct 2, 2024
6c72046
remove unused dependencies, bring ffi crates into workspace
insipx Oct 2, 2024
7a9631d
try to correctly pin openssl-sys to 0.9.92
insipx Oct 2, 2024
a6d5f41
exclude crates from workspace tests tests
insipx Oct 2, 2024
dc1234f
fix workflows
insipx Oct 2, 2024
3ea0935
enable incremental compilation for validation service in CI
insipx Oct 2, 2024
de1e214
try incremenental
insipx Oct 2, 2024
11e0166
incremental
insipx Oct 2, 2024
ed66e03
ci
insipx Oct 2, 2024
843dab5
fix incremental +_ profiles
insipx Oct 3, 2024
98a41ad
dependency cleaning / profile optimization
insipx Oct 3, 2024
863c473
Merge branch 'main' of github.com:xmtp/libxmtp into wasm-backend
insipx Oct 3, 2024
ab48d35
add some documentation
insipx Oct 3, 2024
bea4c5b
remove doc hidden
insipx Oct 3, 2024
c618349
add CI workflow for wasm
insipx Oct 3, 2024
0fd5515
fix ci path
insipx Oct 3, 2024
4d50702
headless
insipx Oct 3, 2024
0131ebe
docker containers
insipx Oct 3, 2024
a6a37c3
enable wasm module for wasm32
insipx Oct 4, 2024
e336e64
wasm init for test-utils feature
insipx Oct 4, 2024
00d1bca
CI
insipx Oct 4, 2024
0a3967d
dont use macos runner
insipx Oct 4, 2024
fc1ea68
fix action
insipx Oct 4, 2024
012b5ec
make sure to use wasm32 target
insipx Oct 4, 2024
f53b00a
cannot use env vars like that
insipx Oct 4, 2024
3c2af0e
use bin name
insipx Oct 4, 2024
a9d086e
remove firefox tests, split build and test phases of CI
insipx Oct 7, 2024
abdd3de
Update WASM bindings (#1122)
rygine Oct 7, 2024
5cb49dd
use nextest instead of build
insipx Oct 7, 2024
8ceabc1
Merge branch 'wasm-backend' of github.com:xmtp/libxmtp into wasm-backend
insipx Oct 7, 2024
180b3dd
Merge branch 'main' of github.com:xmtp/libxmtp into wasm-backend
insipx Oct 7, 2024
22e4101
try to store Client on MlsGroup
insipx Oct 8, 2024
3053006
some kind of progress
insipx Oct 9, 2024
7278c7c
tentative compilation WIP
insipx Oct 9, 2024
3c1d04b
WIP
insipx Oct 9, 2024
27a3346
compiler bug
insipx Oct 10, 2024
ed096d6
WIP, before removing static
insipx Oct 10, 2024
aef1c6e
remove some 'static
insipx Oct 10, 2024
68685f0
wasm compile
insipx Oct 10, 2024
5d882b6
compiles
insipx Oct 10, 2024
a050107
all works
insipx Oct 11, 2024
e9a75e9
fix bindings_ffi
insipx Oct 11, 2024
5d0c3ee
fix tests/benchmarks/cli-client
insipx Oct 11, 2024
a79c0ad
Merge branch 'main' of github.com:xmtp/libxmtp into wasm-experiment
insipx Oct 11, 2024
2f84268
Merge branch 'main' of github.com:xmtp/libxmtp into wasm-experiment
insipx Oct 11, 2024
02a42fe
fix diesel patch
insipx Oct 11, 2024
16487da
fix message history test
insipx Oct 11, 2024
033f31f
remove patch
insipx Oct 11, 2024
fce85c0
fix ci
insipx Oct 11, 2024
3242eb7
update diesel-wasm-sqlite
insipx Oct 11, 2024
24a6917
add split linked modules environment variable
insipx Oct 15, 2024
4526efb
Merge branch 'main' of github.com:xmtp/libxmtp into wasm-backend
insipx Oct 15, 2024
fd4b02c
remove tracing init from tests
insipx Oct 15, 2024
7aeedd0
Merge branch 'main' of github.com:xmtp/libxmtp into wasm-backend
insipx Oct 15, 2024
fe27ed1
clean up subscriptions a little more
insipx Oct 16, 2024
94f82b6
Merge remote-tracking branch 'origin/main' into wasm-backend
codabrink Oct 16, 2024
f8f89a0
lint
codabrink Oct 16, 2024
055d2d1
lint
codabrink Oct 16, 2024
c92b3ad
fix failing scw test
insipx Oct 16, 2024
80d8feb
remove xtask
insipx Oct 16, 2024
a1214ac
dont pin openssl
insipx Oct 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[target.wasm32-unknown-unknown]
runner = 'wasm-bindgen-test-runner'

[alias]
xtask = "run --package xtask --"
8 changes: 5 additions & 3 deletions .github/workflows/test-http-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
# only run tests when related changes are made
paths:
- ".github/workflows/test-workspace.yml"
- ".github/workflows/test-http-api.yml"
- "dev/**"
- "mls_validation_service/**"
- "xmtp_api_http/**"
Expand Down Expand Up @@ -40,5 +40,7 @@ jobs:
run: dev/up
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Run cargo nextest on main workspace
run: cargo nextest run --workspace --exclude xmtp_api_grpc --features http-api --test-threads 2
- name: build tests
run: cargo nextest run --no-run --tests --workspace --exclude xmtp_api_grpc --exclude xmtpv3 --exclude bindings_node --exclude bindings_wasm --features http-api
- name: cargo test
run: cargo nextest run --workspace --exclude xmtp_api_grpc --exclude xmtpv3 --exclude bindings_node --exclude bindings_wasm --features http-api --test-threads 2
48 changes: 48 additions & 0 deletions .github/workflows/test-webassembly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Test Workspace with WebAssembly
on:
push:
branches:
- main
pull_request:
# only run tests when related changes are made
paths:
- ".github/workflows/test-webassembly.yml"
- "xmtp_mls/src/**"
- "xmtp_id/src/**"
- "xmtp_api_http/src/**"
- "Cargo.toml"
- "Cargo.lock"
- "rust-toolchain"
env:
CARGO_TERM_COLOR: always
WASM_BINDGEN_TEST_TIMEOUT: 120
WASM_BINDGEN_TEST_ONLY_WEB: 1
WASM_BINDGEN_SPLIT_LINKED_MODULES: 1
jobs:
test:
name: Test
runs-on: warp-ubuntu-latest-x64-8x
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: taiki-e/install-action@wasm-bindgen
- name: Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: |
.
- name: Start Docker containers
run: dev/up
- name: Build WebAssembly Packages
run: cargo build --tests --release --target wasm32-unknown-unknown -p xmtp_id -p xmtp_mls -p xmtp_api_http -p xmtp_cryptography
- name: test with chrome
run: |
cargo test --release --target wasm32-unknown-unknown -p xmtp_mls -p xmtp_id -p xmtp_api_http -p xmtp_cryptography -- \
--skip xmtp_mls::subscriptions --skip xmtp_mls::groups::subscriptions \
--skip xmtp_mls::storage::encrypted_store::group_message::tests::it_cannot_insert_message_without_group \
--skip xmtp_mls::groups::tests::process_messages_abort_on_retryable_error \
--skip xmtp_mls::storage::encrypted_store::group::tests::test_find_groups \
--skip xmtp_mls::storage::encrypted_store::group::tests::test_installations_last_checked_is_updated
working-directory: ./
env:
CHROMEDRIVER: "chromedriver"
10 changes: 7 additions & 3 deletions .github/workflows/test-workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ jobs:
workspaces: |
.
- name: Start Docker containers
run: dev/up
run: |
dev/build_validation_service_local
dev/docker/up
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Run cargo nextest on main workspace
run: cargo nextest run --test-threads 2
- name: build tests
run: cargo nextest run --no-run --workspace --tests --exclude xmtpv3 --exclude bindings_node --exclude bindings_wasm
- name: cargo test
run: cargo nextest run --workspace --test-threads 2 --exclude xmtpv3 --exclude bindings_node --exclude bindings_wasm
7 changes: 1 addition & 6 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
{
"rust-analyzer.cargo.sysroot": "discover",
"rust-analyzer.linkedProjects": [
"bindings_ffi/Cargo.toml",
"bindings_node/Cargo.toml",
"bindings_wasm/Cargo.toml",
"examples/cli/Cargo.toml"
],
"rust-analyzer.linkedProjects": ["Cargo.toml"],
"rust-analyzer.procMacro.enable": true,
"rust-analyzer.procMacro.attributes.enable": true,
"rust-analyzer.procMacro.ignored": {
Expand Down
Loading