-
Notifications
You must be signed in to change notification settings - Fork 415
Add wasm32-unknown-unknown compilation target support for matrix_sdk_sqlite #6329
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
Open
NoManColonies
wants to merge
32
commits into
matrix-org:main
Choose a base branch
from
NoManColonies:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 22 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
3bc11a5
feat(sqlite): Support compiling to wasm32 target for matrix_sdk_sqlite
7bfe5a1
chore(changelogs): update change log
746b2e8
fix(sqlite): add js feature to support compiling sqlite to WASM target
5325493
chore(sqlite): fix lint warning under WASM target
bb04434
refactor(sqlite): create `SyncWrapper` replacement struct for avoidin…
7d698fd
refactor(sqlite): move db fs setup to utils module
946b397
chore(lint): apply lint fix
c7aff45
refactor(vfs): avoid global installation of VFS
bcd727e
feat(test): make state store test run in WASM environment
51f0837
feat(test): make media store test run in WASM environment
39f27c9
feat(test): make event cache store test run in WASM environment
1aac394
feat(test): make crypto store test run in WASM environment
0b9d6e4
chore(lint): apply lint suggestion
cddebae
feat(ci): configure xtask to run sqlite wasm test suites
4ec20bf
fix(ci): force SQLite wasm test to run in browser only
281aca3
chore(ci): allow dead code when certain features in disabled
4e1b849
feat(ci): run matrix sdk wasm test with sqlite features enabled
ec87f20
fix(ci): missing testing feature
fc742f3
fix(test): incorrect database name passed when clear_data is true
7ed7f48
chore(changelog): update sdk change log
42108b1
refactor(connection): split wasm implementation into a separate module
4bd5f07
chore: remove unintented changes from rebase conflict
fc2b76e
Merge remote-tracking branch 'upstream/main'
c4b68d9
chore(ci-workflow): remove emsdk installation
3ff2df7
chore(ci): group sqlite feature among other sdk features
a62dc9c
chore(ci): remove forced runner
0f3d612
refactor(test): use common sleep method instead of platform specific one
30c9dbc
refactor(connection): refactor connection module to avoid calling set…
750eeed
feat(test): create shared test utils
8f405c0
refactor(test): use temp dir creation utils for unit tests
93758da
chore: remove wasm target os check
5a38eff
chore: clean up git diff
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -249,6 +249,17 @@ jobs: | |
| - name: '[m], indexeddb stores, no crypto' | ||
| cmd: matrix-sdk-indexeddb-stores-no-crypto | ||
|
|
||
| # [m]-sqlite is not supported on Node.js yet, due to | ||
| # dedicated worker requirement for OPFS | ||
| - name: '[m]-sqlite' | ||
| cmd: sqlite | ||
|
|
||
| - name: '[m], sqlite stores' | ||
| cmd: matrix-sdk-sqlite-stores | ||
|
|
||
| - name: '[m], sqlite stores, no crypto' | ||
| cmd: matrix-sdk-sqlite-stores-no-crypto | ||
|
|
||
| steps: | ||
| - name: Checkout the repo | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | ||
|
|
@@ -267,6 +278,14 @@ jobs: | |
| with: | ||
| version: v0.13.1 | ||
|
|
||
| # Required in order to compile SQLite to WebAssembly | ||
| - name: Install emscripten toolchains | ||
| run: | | ||
| git clone https://github.com/emscripten-core/emsdk.git | ||
| cd emsdk | ||
| ./emsdk install latest | ||
| ./emsdk activate latest | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't seem to be necessary when I run this locally. Are you sure it's needed? |
||
|
|
||
| - name: Load cache | ||
| uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2 | ||
| with: | ||
|
|
@@ -290,11 +309,13 @@ jobs: | |
|
|
||
| - name: Rust Check | ||
| run: | | ||
| source ./emsdk/emsdk_env.sh | ||
| target/debug/xtask ci wasm ${{ matrix.cmd }} | ||
|
|
||
| - name: Wasm-Pack test | ||
| if: '!matrix.check_only' | ||
| run: | | ||
| source ./emsdk/emsdk_env.sh | ||
| target/debug/xtask ci wasm-pack ${{ matrix.cmd }} | ||
|
|
||
| typos: | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this matters here.