13961b263Sstephan/**
23961b263Sstephan   post-js-header.js is to be prepended to other code to create
33961b263Sstephan   post-js.js for use with Emscripten's --post-js flag. This code
43961b263Sstephan   requires that it be running in that context. The Emscripten
53961b263Sstephan   environment must have been set up already but it will not have
63961b263Sstephan   loaded its WASM when the code in this file is run. The function it
73961b263Sstephan   installs will be run after the WASM module is loaded, at which
8*1fc6ffccSstephan   point the sqlite3 JS API bits will get set up.
93961b263Sstephan*/
103961b263Sstephanif(!Module.postRun) Module.postRun = [];
113961b263SstephanModule.postRun.push(function(Module/*the Emscripten-style module object*/){
123961b263Sstephan  'use strict';
134bc2f6b4Sstephan  /* This function will contain at least the following:
143961b263Sstephan
153961b263Sstephan     - post-js-header.js (this file)
163961b263Sstephan     - sqlite3-api-prologue.js  => Bootstrapping bits to attach the rest to
174bc2f6b4Sstephan     - common/whwasmutil.js     => Replacements for much of Emscripten's glue
184bc2f6b4Sstephan     - jaccwaby/jaccwabyt.js    => Jaccwabyt (C/JS struct binding)
193961b263Sstephan     - sqlite3-api-glue.js      => glues previous parts together
204bc2f6b4Sstephan     - sqlite3-api-oo.js        => SQLite3 OO API #1
214bc2f6b4Sstephan     - sqlite3-api-worker1.js   => Worker-based API
224bc2f6b4Sstephan     - sqlite3-api-opfs.js      => OPFS VFS
233961b263Sstephan     - sqlite3-api-cleanup.js   => final API cleanup
243961b263Sstephan     - post-js-footer.js        => closes this postRun() function
253961b263Sstephan  */
26