Skip to content

Commit 9be9bd6

Browse files
Merge remote-tracking branch 'upstream/master' into powersync_builds
2 parents 24a090e + 605100a commit 9be9bd6

24 files changed

+409
-29
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ name: wa-sqlite CI
55

66
on:
77
push:
8-
branches: ["master"]
8+
branches: ['master']
99
pull_request:
10-
branches: ["master"]
10+
branches: ['master']
1111

1212
env:
1313
EM_VERSION: 3.1.64
14-
EM_CACHE_FOLDER: "emsdk-cache"
14+
EM_CACHE_FOLDER: 'emsdk-cache'
1515

1616
jobs:
1717
build:
@@ -24,21 +24,21 @@ jobs:
2424
steps:
2525
- uses: actions/checkout@v4
2626
with:
27-
submodules: "recursive"
27+
submodules: 'recursive'
2828
- name: Use Node.js ${{ matrix.node-version }}
2929
uses: actions/setup-node@v4
3030
with:
3131
node-version: ${{ matrix.node-version }}
32-
cache: "npm"
32+
cache: 'npm'
3333

3434
- uses: browser-actions/setup-chrome@v1
3535
id: setup-chrome
3636
with:
37-
chrome-version: 121
37+
chrome-version: 129
3838
- run: |
39-
${{ steps.setup-chrome.outputs.chrome-path }} --version
39+
${{ steps.setup-chrome.outputs.chrome-path }} --version
4040
41-
# Install yarn dependencies.
41+
# Install yarn dependencies.
4242
- name: Get yarn cache directory path
4343
id: yarn-cache-dir-path
4444
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
@@ -50,7 +50,6 @@ jobs:
5050
restore-keys: |
5151
${{ runner.os }}-yarn-
5252
- run: yarn install
53-
5453
- name: Test with checked-in WASM files
5554
run: yarn test
5655

@@ -61,7 +60,7 @@ jobs:
6160
with:
6261
path: ${{env.EM_CACHE_FOLDER}}
6362
key: ${{env.EM_VERSION}}-${{ runner.os }}
64-
- uses: mymindstorm/setup-emsdk@v12
63+
- uses: mymindstorm/setup-emsdk@v14
6564
with:
6665
version: ${{env.EM_VERSION}}
6766
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}

Makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# dependencies
2-
SQLITE_VERSION = version-3.46.0
2+
SQLITE_VERSION = version-3.47.0
33
SQLITE_TARBALL_URL = https://www.sqlite.org/src/tarball/sqlite.tar.gz?r=${SQLITE_VERSION}
44

55
EXTENSION_FUNCTIONS = extension-functions.c
@@ -13,6 +13,7 @@ CFILES = \
1313
main.c \
1414
libauthorizer.c \
1515
libfunction.c \
16+
libhook.c \
1617
libprogress.c \
1718
libvfs.c \
1819
$(CFILES_EXTRA)
@@ -23,6 +24,7 @@ POWERSYNC_CFILES = \
2324
JSFILES = \
2425
src/libauthorizer.js \
2526
src/libfunction.js \
27+
src/libhook.js \
2628
src/libprogress.js \
2729
src/libvfs.js
2830

@@ -39,7 +41,7 @@ COMBINED_EXPORTED_FUNCTIONS = tmp/combined_exports.json
3941

4042
EXPORTED_RUNTIME_METHODS = src/extra_exported_runtime_methods.json
4143
ASYNCIFY_IMPORTS = src/asyncify_imports.json
42-
ASYNCIFY_EXPORTS = src/asyncify_exports.json
44+
JSPI_EXPORTS = src/jspi_exports.json
4345

4446
# intermediate files
4547
OBJ_FILES_DEBUG = $(patsubst %.c,tmp/obj/debug/%.o,$(CFILES))
@@ -102,6 +104,7 @@ EMFLAGS_LIBRARIES = \
102104
--js-library src/libtableupdates.js \
103105
--post-js src/libauthorizer.js \
104106
--post-js src/libfunction.js \
107+
--post-js src/libhook.js \
105108
--post-js src/libprogress.js \
106109
--post-js src/libvfs.js
107110

@@ -118,9 +121,9 @@ EMFLAGS_ASYNCIFY_DIST = \
118121
-s ASYNCIFY_STACK_SIZE=16384
119122

120123
EMFLAGS_JSPI = \
121-
-s ASYNCIFY=2 \
124+
-s JSPI \
122125
-s ASYNCIFY_IMPORTS=@src/asyncify_imports.json \
123-
-s ASYNCIFY_EXPORTS=@src/asyncify_exports.json
126+
-s JSPI_EXPORTS=@src/jspi_exports.json
124127

125128
# https://www.sqlite.org/compile.html
126129
WASQLITE_DEFINES = \

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ If you do want to build - e.g. you want to change build flags, use a specific EM
2121

2222
* Building on Debian Linux is known to work, compatibility with other platforms is unknown.
2323
* `yarn` - If you use a different package manager (e.g. `npm`) then file paths in the demo will need adjustment.
24-
* [Emscripten SDK](https://emscripten.org/docs/getting_started/downloads.html) 3.1.47+.
24+
* [Emscripten SDK](https://emscripten.org/docs/getting_started/downloads.html) 3.1.61+.
2525
* `curl`, `make`, `openssl`, `sed`, `tclsh`, `unzip`
2626

2727
Here are the build steps:

dist/wa-sqlite-async-dynamic-main.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
21.6 KB
Binary file not shown.

dist/wa-sqlite-async.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dist/wa-sqlite-async.wasm

16.5 KB
Binary file not shown.

dist/wa-sqlite-dynamic-main.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dist/wa-sqlite-dynamic-main.wasm

8.81 KB
Binary file not shown.

dist/wa-sqlite-jspi.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)