Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/sqlite/blob/master/ext/wasm/api/post-js-header.js # sqlite [Ported from github.com/sqlite/sqlite] Fix bugs in and improve the interface to the ".check" command of the CLI. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `sqlite / ext / wasm / api / post-js-header.js` 42 lines ยท 1989 bytes Raw Blame History 1 /** 2 post-js-header.js is to be prepended to other code to create 3 post-js.js for use with Emscripten's --post-js flag, so it gets 4 injected in the earliest stages of sqlite3InitModule(). 5 6 Running this function will bootstrap the library and return 7 a Promise to the sqlite3 namespace object. 8 9 In the canonical builds, this gets called by extern-post-js.c-pp.js 10 */ 11 Module.runSQLite3PostLoadInit = async function( 12 sqlite3InitScriptInfo, 13 EmscriptenModule/*the Emscripten-style module object*/, 14 sqlite3IsUnderTest 15 ){ 16 /** ^^^ Don't use Module.postRun, as that runs a different time 17 depending on whether this file is built with emcc 3.1.x or 18 4.0.x. This function name is intentionally obnoxiously verbose to 19 ensure that we don't collide with current and future Emscripten 20 symbol names. */ 21 'use strict'; 22 delete EmscriptenModule.runSQLite3PostLoadInit; 23 //console.warn("This is the start of Module.runSQLite3PostLoadInit()"); 24 /* Post-build, this function will contain at least the following: 25 26 - post-js-header.js => this file 27 - sqlite3-api-prologue.c-pp.js => Bootstrapping bits for the following files 28 - common/whwasmutil.c-pp.js => Generic JS/WASM glue 29 - jaccwabyt/jaccwabyt.c-pp.js => C struct-binding glue 30 - sqlite3-api-glue.js => glues previous parts together and binds the C-style API 31 - sqlite3-api-oo1.js => SQLite3 OO API #1 32 - sqlite3-api-worker1.js => Worker1 API 33 - sqlite3-vfs-helper.c-pp.js => Utilities for VFS impls 34 - sqlite3-vtab-helper.c-pp.js => Utilities for virtual table impls 35 - sqlite3-vfs-opfs.c-pp.js => "opfs" VFS 36 - sqlite3-vfs-opfs-sahpool.c-pp.js => "opfs-sahpool" VFS 37 - sqlite3-vfs-opfs-wl.c-pp.js => "opfs-wl" VFS 38 - post-js-footer.js => this file's epilogue 39 40 And all of that gets sandwiched between extern-pre-js.js and 41 extern-post-js.js. 42 */