Commit Graph

61 Commits

Author SHA1 Message Date
stephan
89954fe7ce Minor doc tweaks in the JS GNUmakefile.
FossilOrigin-Name: 9c8df130b8137cb4705f805907d1ff754d7f4b07bf181e1d05f1798b7aa5f4f6
2022-10-25 08:41:00 +00:00
stephan
8a8244b5c1 Rename sqlite3_web_... to sqlite3_js_... Document the worker1.close.unlink option. Fix unlink usage in speedtest1.html. Minor JS build cleanups.
FossilOrigin-Name: ac9af71b72a749b0a040273a88480d56f49570b569389a4ea20cc055f494d8ff
2022-10-20 18:31:32 +00:00
stephan
a817b30f0b Update the wasm/js 'push' rule to account for this morning's changes.
FossilOrigin-Name: c4a0f745fbaf6f950810f92765cbe66dde66e226b78ec5dd9017473bf4c9c268
2022-10-19 07:51:12 +00:00
stephan
3117dc60e3 Update the dist rules for this evening's js/wasm build changes and include an index.html specifically for the subset of apps included in the dist archive.
FossilOrigin-Name: a0ef0f32e96638b502b3951e524d590bdfb09dd39be453686b075102da67b7db
2022-10-19 06:06:42 +00:00
stephan
cd0df83c15 Apply considerable acrobatics to get the JS/WASM deliverables building to and loadable from a directory other than the one which contains the app-level code. Requires an only-slightly-leaky abstraction of passing a URL argument when loading sqlite3.js but provides much greater flexibility in where the JS/WASM files are located.
FossilOrigin-Name: 6d468dab9eb84d4548f68014959f02fe4f66455472ff24fe729382bb2972e3d1
2022-10-19 04:44:58 +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
b5e2e6fcd3 More work on the JS end-user deliverables. Add tool/stripccomments.c to support that.
FossilOrigin-Name: 2156f0744acfe425457430a0f6a7e02de907de85edba81a6d4eef40293e561c8
2022-10-18 20:36:50 +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
1b8c246799 Repair version-info.c after a local mishap caused all of the intended edits from [36e197cb3d0c]/[e9b407a4d0a0] to get deleted before checkin. Simplify version-info build (only requires sqlite3.h, not the library).
FossilOrigin-Name: 6e511df500c63e27f932be9d601b641144562614dead99371477eca4594fb3fd
2022-10-17 16:47:59 +00:00
stephan
0467b01a1f Rework ext/wasm/version-info.c to make it more useful for the upcoming dist build rules.
FossilOrigin-Name: 36e197cb3d0cbb76e4c1381d77f7d8856e7391f2ef6671c13b9b6b0133315814
2022-10-17 15:52:12 +00:00
stephan
8ffc98999d JS: add build-time-generated version info to the sqlite3.version object. Remove some stray debug output from tester1.js.
FossilOrigin-Name: b5f462c2d85d503f6492ec20580d57cb4c926712f6306a6be764bd09d1f5e8b8
2022-10-16 16:38:15 +00:00
stephan
956392694a Add a top-level license and build-time version info header to generated sqlite3*.js. Correct a broken link in ext/wasm/index.html.
FossilOrigin-Name: 0f1a06e8e39a1fbc74f1aff9cc59787282dfbf847d6c5c7edb3f7d410db0e4b7
2022-10-16 15:38:03 +00:00
stephan
d92c652ac1 Move the rest of testing1.js into tester1.js and eliminate the dependency on jaccwabyt_test.c. Extend the list of default config-related #defines in sqlite3-wasm.c and reorganize them for maintainability.
FossilOrigin-Name: 4e2a8aff2dd4b6e148f45184e2523ebe47815257eca97fa3d32bcbf9625f0def
2022-10-13 16:48:35 +00:00
stephan
4b074692f4 Omit WAL mode from the wasm build.
FossilOrigin-Name: 88efe2a62b81e5ee9119f54204e397fda59666a327158c7b7c972e84a716869e
2022-10-03 18:05:27 +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
d98011852d Work around broken -Os wasm builds by adding the -g3 flag. Unrelated documentation tweaks.
FossilOrigin-Name: f5d6bf8616341037fa3e229edf820d19acef3e0a6207a652b2b143de0a493214
2022-09-28 07:53:47 +00:00
stephan
6559e0ab15 Comment the -O2 wasm builds as being broken (mysteriously missing JS bits).
FossilOrigin-Name: f61475ef8244fd1f6553eca9cc2317e5de2cc04443e24afb7b91ebd3fc1bd402
2022-09-27 14:31:34 +00:00
stephan
f75c0c7036 Reformulate some JS to work around a buggy/broken code transformation in one of the Emscripten-driven code optimizers.
FossilOrigin-Name: e1249369d5ec1c582c280b1f578b35d53637fdf1cbd97c16d5ed95b136b83e56
2022-09-21 20:24:12 +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
fa5aac7475 Merge kv-vfs-magic-names branch into fiddle-opfs branch and make some kvvfs-relevant tweaks.
FossilOrigin-Name: e3d36dcdd37e59f17a07d3611d08744eb86f439fab82a648490dd608bcaa3185
2022-09-20 16:10:39 +00:00
stephan
0e0aafc698 Remove an obsolete file.
FossilOrigin-Name: 1e43855498b4329f733bd6e0731841dc884e885de7d2d338d402d05d54309427
2022-09-20 14:21:58 +00:00
stephan
c9e2602e8f Remove extraneous result-code SAB slots. Doc additions.
FossilOrigin-Name: 88de20712bbe3e11ea74af95edc34e9ab9f346f9aa0a30931e5a9e1f96ce57b0
2022-09-20 10:11:52 +00:00
stephan
5e8bb0aa13 An alternative messaging strategy for the OPFS VFS proxy which uses only SharedArrayBuffer and Atomics, instead of worker messages, for communication (only the initial one-time handshake during initialization uses worker messages). It runs speedtest1 approx. 15-20% faster but still 20-ish% slower than WASMFS.
FossilOrigin-Name: a83ee3082d89439ea3ad5737e63e25bebb0f91895aca006ce5fecf5b93a2651a
2022-09-20 08:27:57 +00:00
stephan
b5ae85eca2 Merge kv-vfs branch into fiddle-opfs. Adjust various JS APIs and apps to deal with the new method of handling kvvfs. Adjust speedtest1 JS build to include sqlite3-api.js so that it can use kvvfs and opfs VFSes. Permit passing of the vfs as a URL parameter to certain demo/test apps. Milestone: speedtest-worker.html?vfs=opfs runs with the standalone OPFS impl.
FossilOrigin-Name: ec09f32f7ae2249aaf27388ad2062982afa8bbbb5f88d236d6d9068bf33ad93d
2022-09-19 13:16:35 +00:00
stephan
ed85333977 Disable build of wasmfs-using components on aarch64 (ARM), as wasmfs won't build there.
FossilOrigin-Name: 9a9eeebc2c27b734041089131b4952d7c0440df48ef32f355641aca61d4b30a0
2022-09-19 00:40:53 +00:00
stephan
c5313afea7 Move the OPFS VFS bits back into api/sqlite3-api-opfs.js. Refactor the OPFS VFS init process to use a Promise-returning function which the client must call, as that eliminates any uncertainty about when the VFS (necessarily activated asynchronously) actually becomes available to the client.
FossilOrigin-Name: 1c660970d0f62bcfd6e698a72b050d99972a1e39f45a5ac24194a190f8f78ab3
2022-09-18 02:35:30 +00:00
stephan
ce260f4e43 Merge kv-vfs branch into fiddle-opfs branch. Adjust speedtest1 --size flags to account for new size limit.
FossilOrigin-Name: afb79050e635f3c698e51f06c346cbf23b096cfda7d0f1d8e68514ea0c25b7b7
2022-09-16 20:16:50 +00:00
stephan
57db2174d5 Add batch-runner-kvvfs.html, a kvvfs-specific build of batch-runner.html. Reduce the speedtest1 --size X value for the batch list generation to 5 so that the kvvfs batch runner can handle it.
FossilOrigin-Name: d8df25920a047d5cf2093cc6233128c5e6057a9104d0c4397e643645bd646fe1
2022-09-16 02:30:49 +00:00
stephan
0144a8482a Add return value checks to kvstorageWrite(), necessary for recognizing storage-full errors in the JS binding. speedtest1-kvvfs.html runs successfully on localStorage with --size 1 to 6 and starts failing with storage shortage at --size 7.
FossilOrigin-Name: 13839759f8f45e4eb0aa6a5052801f3964d5b2dc2e427e5e91ee6692176381eb
2022-09-16 01:05:19 +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
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
stephan
23d39ce54d Get testing1.js working with a kvvfs build.
FossilOrigin-Name: 333a45725d1708e0fefa559c33ce1c7eeb425cdb04f594b1f2b48166c1478c79
2022-09-12 22:27:00 +00:00
stephan
0b769f5b4a Merge kv-vfs branch into fiddle-opfs and add speedtest1-kvvfs.html test app (which currently fails early on).
FossilOrigin-Name: 8b1608a9a37131121cb3a0cb1e8dbad5e39dc1fc2a341d056f09537f179b2e7a
2022-09-12 20:18:28 +00:00
stephan
5360f5fcff Merge kv-vfs branch into fiddle-opfs branch to add kvvfs-based wasm build and demo.
FossilOrigin-Name: a7d8b26acd3c1ae344369e4d70804c0cab45272c0983cfd32d616a0a7b28acb9
2022-09-12 16:09:50 +00:00
stephan
ad5125a624 Initial build of kvvfs in wasm. It loads but cannot find the VFS for as-yet-unknown reasons (sqlite3 shell works fine), and most APIs throw "null function or function signature mismatch" from deep within wasm, presumably as a side effect of the "missing" VFS.
FossilOrigin-Name: 1a2f24a0bdfc6eaae478916b8f4f9c6b63ead9964534fc2951fb4e995ffe61f1
2022-09-12 12:39:28 +00:00
stephan
e99f742a32 Add EM_JS() impl for kvstorageRead().
FossilOrigin-Name: 06610314fcf644f323c2f7ae11d7f4349b195e66d0ebbee590438dd99d97eb96
2022-09-11 04:49:29 +00:00
stephan
d15822965b Initial prototype impls of write/delete-key ops for the pending kvvfs which use sessionStorage or localStorage for db page storage. read-key op is pending.
FossilOrigin-Name: a4bd96f5348e607d0fcb627b751f9d86a188173a4b3bfb2c95f92913a78bd31e
2022-09-11 02:43:08 +00:00
stephan
1174c23e0d Minor build cleanups and tweaks in the speedtest1 wasm apps.
FossilOrigin-Name: 5240fb4d795dea826f23cf5d2152b519f5a46f49bb2499ea868fa7c7f4ce788b
2022-09-08 20:04:52 +00:00
stephan
3a59dd12d2 Add a note about Emscripten's -sSINGLE_FILE flag, why it would be nice, and why we can't use it.
FossilOrigin-Name: 5ea0623630d769a8f3f07a40cd119be86b631192cdb5178131876b01b40ee5e0
2022-09-06 23:04:51 +00:00
stephan
8fc8b5b35f Get speedtest1.js working with WASMFS/OPFS.
FossilOrigin-Name: 40e60f570d4f489d58d12e27c1c067b41d6c5a5e374c5fce0baa8881ef183216
2022-09-06 20:17:15 +00:00
stephan
100b496dd2 Initial build of speedtest1.wasm and speedtest1.html with which to run it.
FossilOrigin-Name: 4441535e3e54dc1881f700fa3878964eb8554a6790fd6aa32945f7cc104a8467
2022-09-06 16:47:43 +00:00
stephan
cdefd5d046 wasm: minor text and build cleanups.
FossilOrigin-Name: 36ceef94e1935f5e85f79e489cd0ed265a77820fb68329c190794df5e076bf84
2022-09-03 11:41:44 +00:00
stephan
53f635df55 batch-runner.js: add rudimentary metrics export to CSV. Add a toggle to reverse the log output mode (in normal order or most recent first).
FossilOrigin-Name: b26e2bc05537a1f451db1bdd36a824d71c3ea25a130b6285f31ff9799d65fa7a
2022-08-30 17:57:50 +00:00
stephan
fbf0f488cf batch-runner.js: move generated SQL files into ./sql and start adding hand-written ones (like the Mandelbrot) to that set.
FossilOrigin-Name: 06c106a7d23e4486dbed092757b7588688226ad35539ecc31378a8497f59d1ec
2022-08-30 10:04:08 +00:00
stephan
2f06bf2541 Lots of tweaking in batch-runner.js. Minor internal API update in OO #1 API.
FossilOrigin-Name: 24b82b9504db3d8e1335c2300b133f897dc1a541026dc24be5b0ffd8be66d977
2022-08-29 18:58:38 +00:00
stephan
2cae138fba Add batch-runner.js for running batch SQL scripts with timing info.
FossilOrigin-Name: 11f3ed61150c5940da6c157e5063e70c3aa0628dfd0023c47bb65b00af74ab1f
2022-08-29 12:39:34 +00:00