SQLite

All files named ”ext/wasm/api/sqlite3-wasm.c”
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

History for ext/wasm/api/sqlite3-wasm.c

2025-06-18
15:37
[d2672a83b9] part of check-in [59db3f639d] Export the column-metadata APIs to WASM. Doing so requires a non-default build of sqlite3.c, so this is a proof-of-concept branch saved just in case SQLITE_ENABLE_COLUMN_METADATA ever becomes the default for sqlite3.c. Edit: that was a misunderstanding on my part. This build increases the .wasm file by only 424 bytes and the JS by 660, so there's no blocker to merging this. (check-in: [59db3f639d] user: stephan branch: wasm-column-metadata, size: 65248)
2025-05-30
10:18
[7ea3d4a286] part of check-in [10d0897cc9] Squelch an interesting but harmless struct initialization warning emitted after an emsdk update. Fix JS breakage introduced by changes in Emscripten 4.0.7: manually export the HEAPxyz symbols which used to be exposed by default. (check-in: [10d0897cc9] user: stephan branch: trunk, size: 65052)
2025-03-01
23:44
[6a4cd40267] part of check-in [46479c2e30] Use SQLITE_EXTRA_INIT_MUTEXED instead of SQLITE_EXTRA_INIT for the SQLITE_WASM_EXTRA_INIT feature, as suggested in forum post 14183b98fc0b1dea. This doesn't make a functional difference now - this is in the name of future-proofing against eventual threading support in wasm. (check-in: [46479c2e30] user: stephan branch: trunk, size: 65046)
2025-02-27
21:17
[b2c99af506] part of check-in [f50c21484d] Approximately 100 typo corrections spanning the whole tree, submitted via forum post 0db9827f0464bc33 and individually audited and verified. Affects only code comments, innocuous test strings, error message text in tool (not library) code, and configure-level help text. (check-in: [f50c21484d] user: stephan branch: trunk, size: 64925)
2025-02-25
20:55
[82b74d419a] part of check-in [af928818a0] Approximately 50 typo fixes, spanning the whole tree, contributed via forum post 006c8fa165083ac3 and individually checked for correctness. Affects only code comments, docs, and a single line of debug output in a test app. (check-in: [af928818a0] user: stephan branch: trunk, size: 64923)
2025-01-31
18:45
[6f9d852907] part of check-in [8da1a9af66] Expose the new SQLITE_DBCONFIG_ENABLE_ATTACH_CREATE/WRITE and SQLITE_DBCONFIG_ENABLE_COMMENTS (from [325e547a21955]) to JS/WASM. (check-in: [8da1a9af66] user: stephan branch: trunk, size: 64922)
2024-10-01
17:57
[2d4340f2da] part of check-in [1755831cb1] Another comment about the LONGDOUBLE wasm topic. No code changes. (check-in: [1755831cb1] user: stephan branch: trunk, size: 65460)
17:08
[2ac6cff596] part of check-in [fa7b56f776] Use the new SQLITE_USE_LONG_DOUBLE to disable long-double support in WASM builds, as they cannot be represented in JS and this saves approximately 5.5kb in the resulting wasm file. (check-in: [fa7b56f776] user: stephan branch: trunk, size: 65421)
10:49
[e94665e662] part of check-in [0b83e8f1ef] Add an #if'd-out block to sqlite3-wasm.c mentioning the LONGDOUBLE_TYPE, as brought up in forum post cbfb0d0ac. No functional changes. (check-in: [0b83e8f1ef] user: stephan branch: trunk, size: 65279)
2024-07-25
16:21
[83f5e9f998] part of check-in [ec02e9237e] Strip progress handlers and window functions from the wasm bare-bones (formerly 'minimal') JS bits, noting that we can't yet use OMIT_WINDOWFUNC (for the C parts) without a custom amalgamation. Currently at 604kb. (check-in: [ec02e9237e] user: stephan branch: wasm-build-rework, size: 64712)
14:00
[79335b70d4] part of check-in [b029c40679] More work on the minimal-mode wasm build (now 603kb uncompressed). Remove the hard-coded feature-enable flags from sqlite3-wasm.c and rely on the build to provide them. Some wasm build cleanup, but attempts to completely overhaul it have been thwarted by my inability to make script-generated makefile code more legible/maintainable than the current eval spaghetti. (check-in: [b029c40679] user: stephan branch: wasm-build-rework, size: 64393)
2024-07-24
23:58
[09a938fc57] part of check-in [eb64d10655] wasm minimal build: strip authorizers and JSON support (saves approx 35kb). Strip vtab support from the JS bits but cannot yet strip it from the C bits because that requires a custom-configured sqlite3.c. (check-in: [eb64d10655] user: stephan branch: trunk, size: 65162)
22:07
[2f795a9689] part of check-in [ee2191f730] Restructuring of the wasm build to support an experimental 'minimal' build mode which elides all non-core APIs. (check-in: [ee2191f730] user: stephan branch: trunk, size: 64160)
2024-04-23
06:49
[9267174b9b] part of check-in [0a07ee27bd] Remove some dead WASM-side code. (check-in: [0a07ee27bd] user: stephan branch: trunk, size: 63698)
2024-04-22
16:46
[3f744dc45a] part of check-in [8fbda563d2] Extend the JS/WASM SEE build support by (A) filtering SEE-related bits out of the JS when not building with SEE and (B) accepting an optional key/textkey/hexkey option to the sqlite3.oo1.DB and subclass constructors to create/open SEE-encrypted databases with. Demonstrate SEE in the test app using the kvvfs. This obviates the changes made in [5c505ee8a7]. (check-in: [8fbda563d2] user: stephan branch: trunk, size: 64735)
2024-03-21
15:52
[afba6827a4] part of check-in [4fea396221] Add comments (only, no code) to the JS sqlite3_config() bindings reminding us why SQLITE_CONFIG_ROWID_IN_VIEW is specifically not included. JNI does not need this treatment because it explicitly supports only a very small subset of config options. (check-in: [4fea396221] user: stephan branch: trunk, size: 64207)
2024-01-08
07:52
[d33a16495c] part of check-in [0eddc20f37] Make explicit which JS APIs are for internal use only by moving the JS-bound internal-use-only functions out of client-visible reach and renaming the WASM-exported ones from sqlite3_wasm... to sqlite3__wasm... (with two underscores). These have always been documented as internal-use-only, so this is not a breaking change except for clients which have ignored the docs. (check-in: [0eddc20f37] user: stephan branch: wasm-post-3.45, size: 63996)
2024-01-02
09:03
[dfd1f1a225] part of check-in [7a7b295e6d] Update and clean up the in-makefile docs for ext/wasm. (check-in: [7a7b295e6d] user: stephan branch: trunk, size: 63933)
2023-12-31
04:01
[dbaefda798] part of check-in [99d11e6d0a] Use SQLITE_ENABLE_STAT4 in both the WASM and JNI builds. (check-in: [99d11e6d0a] user: stephan branch: trunk, size: 64004)
2023-12-14
22:01
[f280d4ea91] part of check-in [990211357b] Use SQLITE_STRICT_SUBTYPE=1 by default for the JNI and WASM builds unless they're explicitly built with SQLITE_STRICT_SUBTYPE=0. (check-in: [990211357b] user: stephan branch: trunk, size: 63937)
2023-11-10
15:00
[d0e09eb5ed] part of check-in [ac9534b2ce] Expose the missing SQLITE_SUBTYPE to wasm. (check-in: [ac9534b2ce] user: stephan branch: trunk, size: 63775)
2023-11-09
17:53
[d1b6c7264e] part of check-in [6d2fe9848b] Expose SQLITE_RESULT_SUBTYPE to wasm. (check-in: [6d2fe9848b] user: stephan branch: trunk, size: 63749)
2023-10-28
04:11
[2d382face3] part of check-in [747b4e3a9e] Remove the SQLITE_MAX_ALLOCATION_SIZE flag (set to 536mb) from the WASM build because it can unduly limit db exports via sqlite3_serialize(), as reported in forum post 75524f7342c1ba45. (check-in: [747b4e3a9e] user: stephan branch: branch-3.43, size: 60520)
03:54
[038de1b6d4] part of check-in [f6e1137919] Remove the SQLITE_MAX_ALLOCATION_SIZE flag (set to 536mb) from the WASM build because it can unduly limit db exports via sqlite3_serialize(), as reported in forum post 75524f7342c1ba45. It now defaults to whatever sqlite3.c uses, which is currently just shy of 2gb. (check-in: [f6e1137919] user: stephan branch: trunk, size: 63714)
2023-10-11
20:37
[c8c5b81b83] part of check-in [c11394b50d] Unconditionally force use of SQLITE_ENABLE_API_ARMOR in the WASM and JNI builds. Their corresponding test suites still work. (check-in: [c11394b50d] user: stephan branch: trunk, size: 63895)
2023-08-29
20:01
[65d6043967] part of check-in [5e79836937] JS SQLTestRunner can now run the Java impl's core-most sanity tests, missing only support for directives. (check-in: [5e79836937] user: stephan branch: js-tester, size: 63619)
2023-08-24
14:17
[6773e94903] part of check-in [b8f6a50a4b] Ensure that db mutex is held when using sqlite3ErrorWithMessage() to avoid a potential assertion in debug builds. (check-in: [b8f6a50a4b] user: stephan branch: wasm-post-343, size: 60799)
2023-08-11
17:38
[d4d4c2b349] part of check-in [da6eaf8d82] Add sqlite3.capi.sqlite3_js_posix_create_file() and oo1.OpfsDb.importDb() as alternatives for the newly-deprecated sqlite3_js_vfs_create_file(). (check-in: [da6eaf8d82] user: stephan branch: trunk, size: 60701)
14:31
[c19041158d] part of check-in [f3647a3ac8] Deprecate sqlite3_js_vfs_create_file() because, it was discovered today, its out-of-scope use of the sqlite3_vfs, sqlite3_file, and sqlite3_io_methods APIs triggers unresolvable assertions in the core when built with SQLITE_DEBUG. (check-in: [f3647a3ac8] user: stephan branch: trunk, size: 59510)
2023-08-04
08:39
[4f0ff557fa] part of check-in [ce2a65d80f] More work towards fts5 customzation in JS. (check-in: [ce2a65d80f] user: stephan branch: wasm-fts5, size: 64177)
2023-08-03
16:21
[45d2ce0089] part of check-in [163e3e44b1] More infrastructure towards binding FTS5 customization support to WASM. (check-in: [163e3e44b1] user: stephan branch: wasm-fts5, size: 63539)
07:20
[2ef539a238] part of check-in [52c8b73ae3] Initial work on exposing the FTS5 APIs to wasm, per request in the forum. This builds and loads the structs into JS but is completely untested. (check-in: [52c8b73ae3] user: stephan branch: wasm-fts5, size: 62884)
2023-07-17
07:13
[8867f1d41c] part of check-in [764430e804] Change wasm build's -DSQLITE_TEMP_STORE=3 to -DSQLITE_TEMP_STORE=2, primarily so that clients can optionally shift temp files from memory to OPFS storage. (check-in: [764430e804] user: stephan branch: opfs-sahpool, size: 59194)
2023-06-10
08:19
[65e4c58924] part of check-in [0b01720879] Add CFLAGS_FIDDLE to ext/wasm/fiddle.make as a way to pass on additional compilation flags to the fiddle build from the CLI, e.g. CFLAGS_FIDDLE=-DSQLITE_STRICT_AGGREGATE. Expose SQLITE_DBCONFIG_STRICT_AGGREGATE to JS. (check-in: [0b01720879] user: stephan branch: newbie-safe-aggregates, size: 59283)
2023-05-01
15:42
[12a096d8e5] part of check-in [0a7024af3f] Expose the SQLITE_DBCONFIG_STMT_SCANSTATUS and SQLITE_DBCONFIG_REVERSE_SCANORDER sqlite3_db_config() options to JS. (check-in: [0a7024af3f] user: stephan branch: trunk, size: 59194)
2023-04-04
17:35
[c42413ca9f] part of check-in [b7ef09be66] Expose the new SQLITE_VTAB_USES_ALL_SCHEMAS to JS. (check-in: [b7ef09be66] user: stephan branch: trunk, size: 59016)
2023-03-10
11:57
[e04e863be7] part of check-in [6195cfc86b] Export SQLITE_FCNTL_RESET_CACHE to JS. (check-in: [6195cfc86b] user: stephan branch: trunk, size: 58974)
2023-03-08
18:05
[b32e40678d] part of check-in [ac7359b263] Export the new SQLITE_CHANGESETAPPLY_IGNORENOOP flag to JS. (check-in: [ac7359b263] user: stephan branch: trunk, size: 58936)
10:05
[4b09550e1a] part of check-in [dd8612c8ad] Extend wasm build to support a custom sqlite3.c to support building against sqlite3-see.c. The JS code now binds the SEE-specific functions if it detects an SEE build. (check-in: [dd8612c8ad] user: stephan branch: trunk, size: 58890)
2023-02-27
07:12
[223d30c41d] part of check-in [68a52cafff] Extend wasm build to enable inclusion of client-custom C code, initialized via the SQLITE_EXTRA_INIT mechanism, per discussion in forum post 1e1c04f3ed1bc96b. (check-in: [68a52cafff] user: stephan branch: trunk, size: 58154)
2023-01-04
03:14
[76625a7093] part of check-in [65ff3200c6] Remove the JS-side SQLITE_WASM_DEALLOC sanity check which triggers the problem mentioned in [688c5c13d156] and [ae0196d86ee8], for reasons covered in the code comments, per discussion in forum post e5b20e1feb. (check-in: [65ff3200c6] user: stephan branch: trunk, size: 57978)
2023-01-02
20:52
[ec402680e3] part of check-in [7f96803c1c] Add some docs explaining a particular piece of [ae0196d86ee8]. No code changes. (check-in: [7f96803c1c] user: stephan branch: trunk, size: 57986)
20:07
[0359e5c2d5] part of check-in [ae0196d86e] Another reformulation of SQLITE_WASM_DEALLOC to attempt to work around a Safari-specific quirk reported in forum post e5b20e1feb. (check-in: [ae0196d86e] user: stephan branch: trunk, size: 57166)
2023-01-01
12:22
[771efb4469] part of check-in [688c5c13d1] An alternative solution to mapping SQLITE_WASM_DEALLOC to the proper function pointer in JS, to account for a Safari-specific quirk reported in forum post e5b20e1feb. (check-in: [688c5c13d1] user: stephan branch: trunk, size: 56946)
2022-12-25
14:13
[2bee083def] part of check-in [7f8f1acd82] Merge trunk into wasm-session-api branch. (check-in: [7f8f1acd82] user: stephan branch: wasm-session-api, size: 56862)
14:04
[325ca43b98] part of check-in [8e3d4f6294] Add missing sqlite3_context_db_handle() JS binding. Reimplement sqlite3_set_authorizer() and sqlite3_set_auxdata() JS bindings to take advantage of [7f9ace1b11a67]. Teach FuncPtrAdapter to emit a console.warn() message if it is invoked after the library is bootstrapped, the goal being to inform users that it's an internal API and should not be invoked from client-side code. (check-in: [8e3d4f6294] user: stephan branch: trunk, size: 56071)
2022-12-24
15:28
[313489816e] part of check-in [ffe2999a91] Replace JS-side use of SQLITE_TRANSIENT with the new SQLITE_WASM_DEALLOC, reducing the amount allocation/copying required by sqlite3_bind_blob/text() and sqlite3_result_blob/text(). Remove the 'experimental' log message from the virtual table tests. (check-in: [ffe2999a91] user: stephan branch: trunk, size: 56040)
2022-12-23
19:33
[e2e8bddedd] part of check-in [f1decc831f] Merge trunk into wasm-session-api branch. (check-in: [f1decc831f] user: stephan branch: wasm-session-api, size: 56755)
18:25
[b114bb85cd] part of check-in [58503cd148] Add SQLITE_ENABLE_MATH_FUNCTIONS to the list of feature flags in sqlite3-wasm.c. (check-in: [58503cd148] user: stephan branch: trunk, size: 55964)
14:11
[f0aafd3e8f] part of check-in [0a39172ee1] Add sqlite3.capi JS bindings for the sqlite3session_...(), sqlite3changeset_...() and sqlite3changegroup_...() APIs, noting that they are completely untested. Aside from missing tests, these bindings reveal a slight string-argument-type shortcoming in the callback function pointer "reverse binding" which should ideally be resolved before publishing them. (check-in: [0a39172ee1] user: stephan branch: wasm-session-api, size: 56670)
11:46
[15194e3d5e] part of check-in [cd8c100808] Initial pieces for binding the session API to JS. Far from complete. See forum post 210e36a1e3 for the discussion. (check-in: [cd8c100808] user: stephan branch: wasm-session-api, size: 56069)
2022-12-16
13:04
[44ce4cf123] part of check-in [62e0c931ac] Expose a JS-friendly subset of sqlite3_config() to JS, with the notable caveats that (1) setting up the JS bindings requires starting the library, making sqlite3_config() illegal to call and (2) calling sqlite3_shutdown() in order to make it legal to call sqlite3_config() may undo certain JS-side library initialization. Move sqlite3_(de)serialize() into the int64-mode-only bindings because of their int64 args. (check-in: [62e0c931ac] user: stephan branch: trunk, size: 55879)
11:13
[f95466be69] part of check-in [551b848894] Add sqlite3_set_authorizer() support and related tests to JS. (check-in: [551b848894] user: stephan branch: trunk, size: 53719)
2022-12-15
18:50
[44f1779bfa] part of check-in [eb27feecea] Added a couple missing 'not part of the public API' tags on functions in sqlite3-wasm.c. No code changes. (check-in: [eb27feecea] user: stephan branch: trunk, size: 52654)
2022-12-12
07:31
[0d3d021c7f] part of check-in [f6f3397a46] Expose sqlite3_txn_state() to wasm. (check-in: [f6f3397a46] user: stephan branch: trunk, size: 52389)
07:27
[8ddad8cbae] part of check-in [3144e7c0b8] Expose a number of infrequently-used sqlite3_...() functions to wasm whose absences were noticed while documenting. (check-in: [3144e7c0b8] user: stephan branch: trunk, size: 52263)
2022-12-09
12:12
[daad00c682] part of check-in [073a2f1eb0] Remove some unused sqlite3_status() codes from the JS API. Add custom JS wrappers for sqlite3_create_collation/_v2() which accept JS functions (plus tests). Expand the argument options for sqlite3_wasm_db_error() to enable it to translate exception objects to C-level errors. (check-in: [073a2f1eb0] user: stephan branch: trunk, size: 51369)
05:47
[ecf7af7259] part of check-in [e144fd5c88] Export sqlite3_status() and sqlite3_stmt_status() to wasm. Expand the arg/return semantics of wasm.get/setPtrValue() and get/setMemValue() to simplify handling of multiple pointers. Edit: tests pass when built with -O0 but fail with -Oz. Moving to branch to work out the breakage. Edit: it was a test bug - one too many levels of pointer indirection. It shouldn't have worked in low-optimization mode. (check-in: [e144fd5c88] user: stephan branch: trunk, size: 51363)
01:49
[5d61665dec] part of check-in [d575366891] Expose sqlite3_db_status() and sqlite3_db_config() to wasm, noting that the latter requires several internal wrappers to account for the various varidic forms (C varargs cannot be bound to wasm). (check-in: [d575366891] user: stephan branch: trunk, size: 50460)
2022-12-08
10:06
[97034ab4f4] part of check-in [51e3c3b569] More work on the JS vtable tests. (check-in: [51e3c3b569] user: stephan branch: wasm-vtab, size: 46958)
2022-12-05
07:51
[723522a6c2] part of check-in [cb9881ec00] More work on the JS side of the virtual table APIs. (check-in: [cb9881ec00] user: stephan branch: wasm-vtab, size: 46735)
05:30
[5120fb3419] part of check-in [c202d7a039] Initial infrastructure for adding virtual table/table-valued function support to WASM. (check-in: [c202d7a039] user: stephan branch: wasm-vtab, size: 45893)
2022-12-03
13:10
[b0babf8435] part of check-in [d9807656f8] Rename wasm.xWrap.resultAdapter() X:free entries to X:dealloc for consistency with wasm.dealloc(). Add an undocumented feature to replace wasm.alloc/dealloc/realloc() with the C-standard allocators (after an allocator misuse led down a several-hour rabbit hole trying to discover a mis-free() violation). Related test updates. (check-in: [d9807656f8] user: stephan branch: trunk, size: 41167)
11:16
[69c2c1bf55] part of check-in [eeb84ba5de] JavaScript: add sqlite3.wasm.realloc(), sqlite3.capi.SQLITE_MAX_ALLOCATION_SIZE, and related tests. (check-in: [eeb84ba5de] user: stephan branch: trunk, size: 41159)
2022-12-02
08:51
[733bc939f9] part of check-in [e06e490c24] Correct the problem which triggered the rollback in [7eec635562f6]: an incorrect default db page size (not a multiple of 512 bytes). (check-in: [e06e490c24] user: stephan branch: trunk, size: 40901)
08:38
[4ee44cc693] part of check-in [7eec635562] Roll back the SQLITE_DEFAULT_PAGE_SIZE part of [c260895faacb34] because kvvfs does not work at all with a page size of 8kb. (check-in: [7eec635562] user: stephan branch: trunk, size: 40728)
08:29
[3fb5170654] part of check-in [c260895faa] sqlite3-wasm.c: code legibility and coding style tweaks. Increase SQLITE_DEFAULT_PAGE_SIZE from 4k to 8k, as that improves OPFS speedtest1 performance by roughly 12%. (check-in: [c260895faa] user: stephan branch: trunk, size: 40707)
07:14
[edae35c7fe] part of check-in [75f610d3a4] Expand JS tests for db export/import and document reason it cannot currently work with kvvfs. Fix a minor JS build dependencies bug. Update page title with PASS/FAIL prefix for tester1.js to improve overview when launching multiple test tabs. Add ability of tester1 should-run-test predicates to report why a given test is disabled. (check-in: [75f610d3a4] user: stephan branch: trunk, size: 40535)
2022-11-23
21:03
[8b32787a3b] part of check-in [9c23644b1e] Add optional zSchema argument to sqlite3_js_db_export(). (check-in: [9c23644b1e] user: stephan branch: trunk, size: 40088)
2022-11-13
19:29
[8fc8f47680] part of check-in [80ff592a9d] Remove some outdated code comments. No code changes. (check-in: [80ff592a9d] user: stephan branch: trunk, size: 39968)
2022-11-04
09:02
[778409e00f] part of check-in [479ad980df] Correct sqlite3-wasm.c's SQLITE_DEFAULT_CACHE_SIZE (it's measured in kb, not bytes). (check-in: [479ad980df] user: stephan branch: trunk, size: 40113)
2022-11-02
14:08
[af472ec27b] part of check-in [70ee6ee014] Minor build cleanups and fix a harmless race condition in the OPFS part of tester1.js. (check-in: [70ee6ee014] user: stephan branch: trunk, size: 40116)
11:53
[41f4c807d5] part of check-in [b35e1225c9] Add sqlite3_wasm_vfs_create_file() to replace Emscripten's FS.createDataFile() in a (mostly) VFS-agnostic way. Add a test for worker1's export (to bytearray) support. Re-add worker1 open-from-bytearray using sqlite3_wasm_vfs_create_file() but it's untested (requires a new interactive test app or maybe reconsideration). (check-in: [b35e1225c9] user: stephan branch: trunk, size: 40056)
2022-10-30
09:47
[14ac9c03f6] part of check-in [50f678846a] 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. (check-in: [50f678846a] user: stephan branch: trunk, size: 36207)
2022-10-21
17:48
[940d576bda] part of check-in [fcd9e0dbe3] Add SQLITE_DQS to the compileoptions_used list, per request in forum post 8b1060122b. Force DQS=0 in sqlite3-wasm.c. (check-in: [fcd9e0dbe3] user: stephan branch: trunk, size: 36205)
2022-10-20
21:28
[dde771a10e] part of check-in [9d034ef5e1] Add more JS tests. Flesh out the aggregate UDF tests to use sqlite3_aggregate_context() so that they can each be used multiple times in the same statement. Add sqlite3_js_aggregate_context() convenience helper. (check-in: [9d034ef5e1] user: stephan branch: trunk, size: 36173)
05:14
[e1fcda9777] part of check-in [cdd46858f0] Rework sqlite3_wasm_vfs_unlink(), add sqlite3_wasm_db_vfs(), update some docs. (check-in: [cdd46858f0] user: stephan branch: trunk, size: 36145)
2022-10-19
01:07
[84d410a2b9] part of check-in [5b23e0675e] 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. (check-in: [5b23e0675e] user: stephan branch: trunk, size: 35812)
2022-10-13
16:48
[4c131945ce] part of check-in [4e2a8aff2d] 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. (check-in: [4e2a8aff2d] user: stephan branch: trunk, size: 35808)
2022-10-12
15:40
[a321f12cee] part of check-in [5144c122a9] Minor doc cleanups and corrections in sqlite3-wasm.c (check-in: [5144c122a9] user: stephan branch: fiddle-opfs, size: 32198)
2022-10-09
13:26
[ea456d398b] part of check-in [a9047e020a] Refactor kvvfs JS bits to make use of [ea370b9b05f7ed7eaa]. At main-thread startup, if kvvfs is available, replace the kvvfs I/O methods with JS impls. Checkin part 2 of 2, to account for cherrypicking [ea370b9b05f7ed7eaa] into the kv-vfs branch. (check-in: [a9047e020a] user: stephan branch: fiddle-opfs, size: 31890)
2022-10-04
01:11
[0c8cb242b8] part of check-in [97bd670d38] Minor cleanups and additions in sqlite3.capi.wasm.pstack. (check-in: [97bd670d38] user: stephan branch: fiddle-opfs, size: 30520)
2022-10-03
23:13
[1ed1356752] part of check-in [72a9e589cc] Set default page cache size to 16mb in wasm builds. Fix an off-by-one counter in sqlite3_wasm_enum_json(). Minor coding style conformance tweaks. (check-in: [72a9e589cc] user: stephan branch: fiddle-opfs, size: 30209)
18:05
[3838ad650c] part of check-in [88efe2a62b] Omit WAL mode from the wasm build. (check-in: [88efe2a62b] user: stephan branch: fiddle-opfs, size: 29262)
13:03
[3bb9fe3de3] part of check-in [508f7f6d63] Export sqlite3_trace_v2() to wasm and use it to ensure that the new per-VFS post-open SQL support in the DB ctor works. Default opfs vfs to journal_mode=truncate, as it's faster in that mode. Add 't' DB open-mode flag to enable SQL tracing to console.log(). (check-in: [508f7f6d63] user: stephan branch: fiddle-opfs, size: 29206)
08:21
[074c1c80b5] part of check-in [a82e6faaa6] Minor JS API tweaks prompted by documenting them. (check-in: [a82e6faaa6] user: stephan branch: fiddle-opfs, size: 28342)
2022-10-02
03:11
[2a0f9e4bf1] part of check-in [eb5726677a] More fleshing out of sqlite3.capi.wasm.pstack. (check-in: [eb5726677a] user: stephan branch: fiddle-opfs, size: 28342)
2022-10-01
18:55
[d72aecf0e5] part of check-in [c8a173cf16] Pedantic constness tweak. (check-in: [c8a173cf16] user: stephan branch: fiddle-opfs, size: 28204)
18:47
[43216a5266] part of check-in [1fa019c88d] wasm: correct a memleak caused by a shadowed var in the previous checkin. Add a stack-like allocator, sqlite3.capi.wasm.pstack, as a faster way of managing short-lived pointers (like the one which got shadowed). (check-in: [1fa019c88d] user: stephan branch: fiddle-opfs, size: 28206)
16:01
[61c6bf8404] part of check-in [29db7de792] Fiddle: fix makefile dependency issue and duplicate inclusion of post-js.js. Reimplement db export using sqlite3_serialize(). (check-in: [29db7de792] user: stephan branch: fiddle-opfs, size: 24534)
2022-09-30
10:55
[336389b23c] part of check-in [fbc0edb5d3] wasm: expose sqlite3_de/serialize(), sqlite3_malloc/free() and friends, noting that the former explicitly lies on use of the latter for memory management so is not generically safe for use in wasm. (check-in: [fbc0edb5d3] user: stephan branch: fiddle-opfs, size: 21649)
2022-09-27
13:40
[b756b9c1fe] part of check-in [c42a8cb090] WASM API renaming. Reworked JS API bootstrap's async post-init into a generic mechanism, no longer OPFS-specific. (check-in: [c42a8cb090] user: stephan branch: fiddle-opfs, size: 20470)
09:17
[1409d76529] part of check-in [4dc972a365] wasm/js: rename /persistent to /opfs to account for potential future persistent storage options. Minor flag-handling cleanups in the speedtest1 pages. Minor API tweaks in oo1. (check-in: [4dc972a365] user: stephan branch: fiddle-opfs, size: 20401)
2022-09-26
11:34
[7010405f19] part of check-in [85f2e877e5] wasm: change StructBinder signature for sqlite3_file::pMethods from 'P' to 'p' to eliminate an unnecessary and inconsistent level of magic. (check-in: [85f2e877e5] user: stephan branch: fiddle-opfs, size: 20366)
2022-09-21
19:51
[d1c0724136] part of check-in [7c7fb7535e] 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. (check-in: [7c7fb7535e] user: stephan branch: fiddle-opfs, size: 20366)
12:27
[9401a3f9bd] part of check-in [5c5e806528] Doc cleanups and additions. Add a way for the OPFS async runner to propagate exception text to the calling thread. (check-in: [5c5e806528] user: stephan branch: fiddle-opfs, size: 19413)
2022-09-15
06:42
[4130e2df95] part of check-in [00ee49a3a2] More work on the synchronous OPFS experimentation. Numerous wasm/js build tweaks. Add speeedtest-wasmfs.html, the wasmfs/opfs counterpart of speedtest1.html. (check-in: [00ee49a3a2] user: stephan branch: fiddle-opfs, size: 19423)
2022-09-13
19:27
[7d1760f3a8] part of check-in [0d78961870] Add/apply various kvvfs-specific utility APIs to the JS layer to assist in testing and analysis. Correct a backwards default arg check for sqlite3ApiBootstrap(). Add exports for sqlite3_db_handle(), sqlite3_file_control(), and the SQLITE_FCNTL_xxx enum. (check-in: [0d78961870] user: stephan branch: fiddle-opfs, size: 19413)
2022-09-12
16:09
[bf4637cf28] part of check-in [a7d8b26acd] Merge kv-vfs branch into fiddle-opfs branch to add kvvfs-based wasm build and demo. (check-in: [a7d8b26acd] user: stephan branch: fiddle-opfs, size: 17835)
2022-09-11
16:59
[ab8abf2670] part of check-in [4e6ce32987] Minor cleanups and documentation in the wasm pieces. (check-in: [4e6ce32987] user: stephan branch: fiddle-opfs, size: 25168)
05:44
[7fc3a86843] part of check-in [cdbf09fa1b] Correct the result code from kvstorageRead() for the OOM case to be a negative value. (check-in: [cdbf09fa1b] user: stephan branch: fiddle-opfs, size: 23112)
05:38
[ca61244ff1] part of check-in [53b7572e44] Minor cleanups and docs for the EM_JS() impls of the kvvfs read/write/delete ops. (check-in: [53b7572e44] user: stephan branch: fiddle-opfs, size: 23111)
04:49
[af771ebd94] part of check-in [06610314fc] Add EM_JS() impl for kvstorageRead(). (check-in: [06610314fc] user: stephan branch: fiddle-opfs, size: 21968)
02:43
[c9a1cbe67b] part of check-in [a4bd96f534] 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. (check-in: [a4bd96f534] user: stephan branch: fiddle-opfs, size: 20698)
2022-09-06
20:17
[19c3797edc] part of check-in [40e60f570d] Get speedtest1.js working with WASMFS/OPFS. (check-in: [40e60f570d] user: stephan branch: fiddle-opfs, size: 16096)
2022-08-22
13:34
[0d81282eae] part of check-in [9dbe9a6aec] Refactor JS API amalgamation such that the bootstrapping/configuration is deferred until the whole amalgamation is available, to facilitate providing clients with a way to initialize the API with their own config (noting that we're still one small level of refactoring away from being able to actually do that). (check-in: [9dbe9a6aec] user: stephan branch: fiddle-opfs, size: 16079)
2022-08-13
13:56
[0e78035045] part of check-in [41045be752] Cleanups in the wasmfs/opfs integration but disable it in order to get the build into a known-working state before continuing with experimentation. (check-in: [41045be752] user: stephan branch: fiddle-opfs, size: 15541)
2022-08-12
17:57
[0b3f56078f] part of check-in [a16f0a46ec] Build fiddle with WASMFS OPFS support and attempt to use it if available. It does not work because of an inexplicable exception in Emscripten-generated code and perpetually-locked db, but it's not yet clear why. (check-in: [a16f0a46ec] user: stephan branch: fiddle-opfs, size: 14701)
13:07
[8585793ca8] part of check-in [4c10b9b18f] wasm: document the role of sqlite3-wasm.c. Other minor doc updates. (check-in: [4c10b9b18f] user: stephan branch: trunk, size: 13210)
2022-08-10
13:22
[827357635c] part of check-in [683a3b937e] wasm opfs: error handling fix for an impossible-to-reach error case. Minor cosmetic tweaks in the wasm JSON enum. (check-in: [683a3b937e] user: stephan branch: wasm-cleanups, size: 13169)
11:26
Added: [2d3e6dea54] part of check-in [27f9da4eaa] wasm refactoring part 2 of (apparently) 2: moved ext/fiddle/... into ext/wasm and restructured the core API-related parts of the JS/WASM considerably. (check-in: [27f9da4eaa] user: stephan branch: wasm-cleanups, size: 13189)