1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

WASM API renaming. Reworked JS API bootstrap's async post-init into a generic mechanism, no longer OPFS-specific.

FossilOrigin-Name: c42a8cb090cad1108dfd6be574202d744c59e053b505bc4c17252dc6b65d26bf
This commit is contained in:
stephan
2022-09-27 13:40:12 +00:00
parent 3d64548491
commit 5b9973d898
16 changed files with 140 additions and 76 deletions

View File

@ -81,11 +81,10 @@
setStatus: (text)=>mPost('load-status',text)
};
self.sqlite3Speedtest1InitModule(EmscriptenModule).then(function(EModule){
const S = EModule.sqlite3;
log("Module inited.");
return S.installOpfsVfs()
.catch((e)=>console.warn(e.message))
.then(()=>{
return EModule.sqlite3.asyncPostInit()
.then((sqlite3)=>{
const S = sqlite3;
const vfsUnlink = S.capi.wasm.xWrap("sqlite3_wasm_vfs_unlink", "int", ["string"]);
App.unlink = function(fname){
vfsUnlink(fname);