diff options
author | stephan <stephan@noemail.net> | 2022-10-19 01:07:30 +0000 |
---|---|---|
committer | stephan <stephan@noemail.net> | 2022-10-19 01:07:30 +0000 |
commit | 71de8e02416aa9a4ad90ac6958ff3fa025a33d2d (patch) | |
tree | 0c2b079d3d1015cbbc4af3dfd08107e96d2e2d1d /ext/wasm/api | |
parent | b5e2e6fcd39901f3280a4bbbfec7f41d4bcc48f8 (diff) | |
download | sqlite-71de8e02416aa9a4ad90ac6958ff3fa025a33d2d.tar.gz sqlite-71de8e02416aa9a4ad90ac6958ff3fa025a33d2d.zip |
Considerable wasm/js build cleanups and reworking. Remove wasmfs builds from the end-user deliverables and disable the wasmfs build by default, per /chat discussion, as it doubles our deliverable count for only marginal gain. Attempt to move the sqlite3.js/wasm files into subdirectories but rediscovered that that breaks loading in Worker mode because URI resolution of the wasm files differs depending on whether the main script is loaded from a script tag or a Worker.
FossilOrigin-Name: 5b23e0675efdd2f1ea7b4f5836a579e8d6aa8a25b3f1a6a950520ad845ff01bb
Diffstat (limited to 'ext/wasm/api')
-rw-r--r-- | ext/wasm/api/extern-post-js.js | 8 | ||||
-rw-r--r-- | ext/wasm/api/sqlite3-api-prologue.js | 1 | ||||
-rw-r--r-- | ext/wasm/api/sqlite3-wasm.c | 2 |
3 files changed, 9 insertions, 2 deletions
diff --git a/ext/wasm/api/extern-post-js.js b/ext/wasm/api/extern-post-js.js index 51e8d12b2..7dba03b3a 100644 --- a/ext/wasm/api/extern-post-js.js +++ b/ext/wasm/api/extern-post-js.js @@ -43,3 +43,11 @@ self.sqlite3InitModule.ready = originalInit.ready; //console.warn("Replaced sqlite3InitModule()"); })(); + +if(0){ + console.warn("self.location.href =",self.location.href); + if('undefined' !== typeof document){ + console.warn("document.currentScript.src =", + document?.currentScript?.src); + } +} diff --git a/ext/wasm/api/sqlite3-api-prologue.js b/ext/wasm/api/sqlite3-api-prologue.js index 7d9ae9691..f8c0f024e 100644 --- a/ext/wasm/api/sqlite3-api-prologue.js +++ b/ext/wasm/api/sqlite3-api-prologue.js @@ -1158,7 +1158,6 @@ self.sqlite3ApiBootstrap = function sqlite3ApiBootstrap( */ capi.sqlite3_web_db_export = function(pDb){ if(!pDb) toss('Invalid sqlite3* argument.'); - const wasm = wasm; if(!wasm.bigIntEnabled) toss('BigInt64 support is not enabled.'); const stack = wasm.pstack.pointer; let pOut; diff --git a/ext/wasm/api/sqlite3-wasm.c b/ext/wasm/api/sqlite3-wasm.c index 26771d5c9..cda4e7ae2 100644 --- a/ext/wasm/api/sqlite3-wasm.c +++ b/ext/wasm/api/sqlite3-wasm.c @@ -1007,7 +1007,7 @@ int sqlite3_wasm_init_wasmfs(const char *zMountPoint){ hypothetically suffice for the transient wasm-based virtual filesystem we're currently running in. */ const int rc = wasmfs_create_directory(zMountPoint, 0777, pOpfs); - emscripten_console_logf("OPFS mkdir(%s) rc=%d", zMountPoint, rc); + /*emscripten_console_logf("OPFS mkdir(%s) rc=%d", zMountPoint, rc);*/ if(rc) return SQLITE_IOERR; } return pOpfs ? 0 : SQLITE_NOMEM; |