1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-12-20 01:22:32 +03:00

Move sqlite3-api-cleanup.js into post-js-footer.js to remove the final direct Emscripten dependency from the intermediary build product sqlite3-api.js (the whole library, waiting to be bootstrapped). This is partly in response to [forum:4b7d45433731d2e0|forum post 4b7d45433731d2e0], which demonstrates a potential use case for a standalone sqlite3-api.js. This is a build/doc change, not a functional one.

FossilOrigin-Name: 2fcbd8e17d8f1dd7e9d45168805dba718777e46803d9375a4212296d3d0cd89c
This commit is contained in:
stephan
2025-11-15 09:19:03 +00:00
parent 5279cbd353
commit a804a65617
10 changed files with 143 additions and 135 deletions

View File

@@ -35,8 +35,12 @@
const sIMS =
globalThis.sqlite3InitModuleState/*from extern-post-js.c-pp.js*/
|| Object.assign(Object.create(null),{
debugModule: ()=>{
console.warn("globalThis.sqlite3InitModuleState is missing");
/* In WASMFS builds this file gets loaded once per thread,
but sqlite3InitModuleState is not getting set for the
worker threads? That those workers seem to function fine
despite that is curious. */
debugModule: function(){
console.warn("globalThis.sqlite3InitModuleState is missing",arguments);
}
});
delete globalThis.sqlite3InitModuleState;
@@ -89,8 +93,7 @@
//#endif target:es6-module
}.bind(sIMS);
//#if Module.instantiateWasm
//#if not wasmfs
//#if Module.instantiateWasm and not wasmfs
/**
Override Module.instantiateWasm().
@@ -126,7 +129,6 @@
.then(finalThen)
return loadWasm();
}.bind(sIMS);
//#endif not wasmfs
//#endif Module.instantiateWasm
//#endif Module.instantiateWasm and not wasmfs
})(Module);
/* END FILE: api/pre-js.js. */