Commit Graph

30 Commits

Author SHA1 Message Date
stephan
fabae7a134 Minor makefile doc fixes. No functional changes.
FossilOrigin-Name: b3ad58e1fc73941f2d32bab0e0fac0b95849ae69f84788a431e65bb072e42db5
2024-09-28 00:39:19 +00:00
stephan
405ae974ee Further wasm build cleanups and tweaks. No functional changes.
FossilOrigin-Name: 3b72a143431537ec275aefae739e56330c1d445c9ea80885882a2b9aa2201179
2024-09-24 00:31:08 +00:00
stephan
69cce89425 wasm: replace much of the eval makefile spaghetti with equivalent code generated from a small C app. It turns out that's easier to read and write than doing the same thing from shell or tcl code, due entirely to C's lack of need for escaping dollar signs.
FossilOrigin-Name: 5440de48903e94f91090e2df65702ec0c504e33dd5cbd50f684cf30988f20b02
2024-09-23 21:22:09 +00:00
stephan
cc65612e35 Start work on an overhaul of the wasm build process, with an eye towards less over-engineering.
FossilOrigin-Name: ed746b3dd3248b68cb91de50ac5ba5fd3a7c2fcbde76324e86b88edbfecd896b
2024-07-25 10:50:45 +00:00
stephan
8ba619b5f5 Minor wasm build cleanups.
FossilOrigin-Name: 816b503f093c4e6d92d0eb2f9fbd841acd01cc9bc89ee58d961b56c64f71406a
2023-07-14 12:21:05 +00:00
stephan
f4449dc0ba Reintroduce WASMFS+OPFS support, albeit as a separate (less portable) WASM build.
FossilOrigin-Name: 7e4c594e9591101f6b727212c99f561498444e86d3d059e5864a717c614f903a
2023-07-13 18:35:48 +00:00
stephan
d51cefd1bb Get speedtest1 wasmfs variant running again.
FossilOrigin-Name: 0f77e031daf0121f7603409cedf57f138edbb43083cbbcf00d2a423e16de25a7
2023-07-13 16:33:45 +00:00
stephan
cc336321f8 Significant surgery on the wasm build on the way to incorporating wasmfs as a first-class build option.
FossilOrigin-Name: 215c37fce38cf647e073480689b79d952af7eb8165ae08c7f5caed27003fecfc
2023-07-13 14:08:30 +00:00
stephan
d41d454fc1 More work on the wasmfs build. Resolve the inconsistent argument type passed to sqlite3InitModule() in such builds.
FossilOrigin-Name: 4850a9e2d2b41b91e91b9ef99a6d26ddf11a161b4c970fc00d2d095606729a04
2023-07-13 10:41:41 +00:00
stephan
0f0e5700ba Minor cleanups in the wasmfs build.
FossilOrigin-Name: f64477f21040c265061ad9b7f601e74159fd6141e7e4b122c80bf244ab6ddb76
2023-07-13 04:54:18 +00:00
stephan
01bdff7a1c Get wasmfs build and its bare-bones test app working again, albeit currently in ES6 mode only.
FossilOrigin-Name: 647761ed422f196f94facc88bbddd7219a2c1a6301a5f847b0a32d3e405233a7
2023-07-13 04:26:13 +00:00
stephan
a4d04c59ba Update wasmfs.make to get WASMFS building again, but changes made to OPFS-over-WASMFS since we last tested it have made it incompatible with how we used it. It can now only be used from worker threads, eliminating the one benefit it had over the sqlite3_vfs OPFS implementation. Remove/amend references to WASMFS in the docs and remove all WASMFS-specific test app links from index.html.
FossilOrigin-Name: 32dc98c8001387b1970623192ec6cb89445000fa49bda5f4bd7c525bbe20bb5b
2022-12-17 11:14:35 +00:00
stephan
5ad4e89659 wasm builds: explicitly set a default stack size because emsdk 3.1.27 reduced it from 4MB to only 64kb, leading to memory corruption when kvvfs is used (it requires at least twice that for I/O).
FossilOrigin-Name: 758112460fb624198a144ed7d8d2324497fa72a2eee80010bd22b621e064b389
2022-12-02 10:43:14 +00:00
stephan
b2873a3014 Generic cleanups and doc additions in the wasm build files.
FossilOrigin-Name: d10f385e36ee7fe3077d80d8d6e7ce55732d20ef73e2a63533d8d2932ec8bf62
2022-11-20 04:14:00 +00:00
stephan
27a67968af Add build of sqlite3.mjs (ES6 module), add a test app for it, and include it in the dist build.
FossilOrigin-Name: 2e783670e10b59e67c14b0db7f4803b41790cc7730de221d54fa2d4483cfba33
2022-11-19 05:26:45 +00:00
stephan
de6186e04f Minor build cleanups and fix a harmless race condition in the OPFS part of tester1.js.
FossilOrigin-Name: 70ee6ee014bc4e2c1daa9b4a8909cf76ccecf32de1eb39055f20d3d0b1daa1bd
2022-11-02 14:08:59 +00:00
stephan
1fc6ffccc5 Minor WASM build cleanups. Enable custom Module.instantiateWasm() when not in WASMFS mode (where it doesn't work). Add sqlite3.debugModule URL param to enable some module-init-time debugging output.
FossilOrigin-Name: 50f678846a2b3c3d0818f0bae89f2ee86252a2e6a9c7029ebaae3953ca0fa14c
2022-10-30 09:47:33 +00:00
stephan
af9cee12c1 Reduce wasm module's starting memory from 128mb to 16mb. The latter value is needed only for WASMFS-based batch-runner.js, as WASMFS builds cannot be configured for dynamic memory growth without a tremendous performance hit.
FossilOrigin-Name: ed9d93c48752ba6e18edc1238a8ccdbf6bb65c74fb52a89d515f8b0ab6bea13a
2022-10-30 08:39:18 +00:00
stephan
71de8e0241 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
2022-10-19 01:07:30 +00:00
stephan
e79a0943ed Initial draft of archive generation for the wasm/js deliverables.
FossilOrigin-Name: f6cee114c71e11ca1f508c8f60be5753871cbd4fd6c45ce397824bddbf00ffd9
2022-10-17 17:34:41 +00:00
stephan
f71c954cbc Add JS infrastructure to ostensibly allow us to customize the wasm imports, which will hypothetically allow us to eliminate the dependency on EM_JS(), but the corresponding Emscripten glue-level feature currently breaks fatally with WASMFS builds so it's disabled.
FossilOrigin-Name: 88d9253b0db5494bf1c9b6d24f22524eeec856b89e64a66ffb30d945f0df21d3
2022-09-29 22:08:22 +00:00
stephan
b0ccf50cbd Ensure that the wasm builds always, even when passing -Ox flags from the CLI, use -g3 to avoid problems caused by symbol minification with optimization levels -O2 and higher.
FossilOrigin-Name: 27d24d5d270e272af07d96cf07bdbe79ba07a9c69ba3c70beb76ebf4f90fc97a
2022-09-29 17:35:25 +00:00
stephan
b94a98607a Rework the Emscripten-emitted module loader/init function such that it passes on the sqlite3 module, instead of the Emscripten module, to the first then() of sqlite3InitModule()'s returned Promise. This eliminates any need to mention the Emscripten module object in client-side code unless they want to configure it in advance for loading-status reports.
FossilOrigin-Name: 0dbaa0e2b5abf5c23e2039ec90a3055ebb3c063aaf4e556c42546defe6fbb86d
2022-09-29 13:17:50 +00:00
stephan
5ad3631915 Correct duplicate copies of sqlite3-api.js being embedded in the wasmfs-based builds.
FossilOrigin-Name: bbfcfba260f39a9c91e82d87e06b1c2cb297c03498b4530aa3e7e01ef9916012
2022-09-28 13:01:49 +00:00
stephan
6110a5d0ab Put pieces in place for fiddle to support opfs, but more cleanup is required in the sqlite3.js/fiddle connection. bigIntEnabled now defaults to whether the Emscripten's module has bigint enabled. Add wasm-sensible defaults for several SQLITE_ENABLE/OMIT flags in sqlite3-wasm.c.
FossilOrigin-Name: 7c7fb7535e86b3960eea7f29ab7e6d5197c166b4ee64ad4a9bc0749f2869badc
2022-09-21 19:51:25 +00:00
stephan
4bc2f6b415 Move fiddle build rules into the wasm-centric build files. Add rule to push wasm bits to the wasm test server.
FossilOrigin-Name: 113f8204dc4ac849d5632d3de1680b6e0da871e107ef484c8d7273799bee3d88
2022-09-21 08:39:03 +00:00
stephan
61418d5a67 Remove an obsolete file. Update wasmfs build for today's changes. Fix the case that OPFS.xTruncate() is passed a BigInt instead of a Number.
FossilOrigin-Name: 976053925013bf1975f5f9222e28ba648af28e305bb6bdae600eb24d0e136bec
2022-09-19 14:56:13 +00:00
stephan
28ef9bddb3 More work on the synchronous OPFS experimentation. Numerous wasm/js build tweaks. Add speeedtest-wasmfs.html, the wasmfs/opfs counterpart of speedtest1.html.
FossilOrigin-Name: 00ee49a3a2c148480f614e49a0ee5b35a255758c0a53693f0b464b31e7a4045b
2022-09-15 06:42:41 +00:00
stephan
dae7518ae4 Remove some stale comments. Get scratchpad-opfs-worker2.js running again in prep for reuse in experimenting with the OPFS all-synchronous API.
FossilOrigin-Name: 4cbbd370186f84e440f496e7f11c641d7dc1723acc46e4a31483392e0eb046e9
2022-09-15 03:16:49 +00:00
stephan
0117693f62 Split wasmfs-enabled build of sqlite3.js/wasm into sqlite3-wasmfs.js/wasm, as enabling wasmfs breaks all tests/demos which run from a Worker thread.
FossilOrigin-Name: 08476f3c218d45846e7496bdae0b06e2122466111fdf2aa2aabb1805b15ef982
2022-09-15 03:09:00 +00:00