stephan
|
ce53b80819
|
Minor doc correction and a JS error message tweak.
FossilOrigin-Name: c4ae21c89e5fd40eefd4916df6c6a6c4e27075a434a9d47576d3fcfbc7720588
|
2025-11-13 06:49:12 +00:00 |
|
stephan
|
b867030b1a
|
Clarify that 'pikchr' is not a typo.
FossilOrigin-Name: d7bb2ee6ec23c266c887fb2aeb77b0b17cd8f1429564d341537f57c5478410e2
|
2025-11-12 17:25:17 +00:00 |
|
stephan
|
73caea1764
|
Reworking of JS internals to support binding of nested C structs (like sqlite3_index_constraint and friends) and allow some of the automated JS/C conversions to be plugged in at the struct-binding level, simplifying how struct members, in particular function pointers, can be used from JS.
FossilOrigin-Name: bb4fd5b789cebf2b224c29023fea3e620a86fb36730c36c0d85d9f35880bf643
|
2025-11-10 07:41:54 +00:00 |
|
stephan
|
c55d8262cf
|
In sqlite3.wasm.allocFromTypedArray(), swap the order of the allocation and the access to the heap view object to work around an obscure issue when allocating huge blobs. The heap view object could previously become stale via the following allocation if the underlying WebAssembly.Memory object needed to grow. Essentially a realloc()-moves-the-pointer situation but it only comes up with huge allocations under the right circumstances and would trigger a JS exception (as opposed to corrupting the WASM heap). Problem reported in [forum:05b77273be104532|forum post 05b77273be104532].
FossilOrigin-Name: 0f712b6b0516dc151d3bcbb63497661c82e11eae368e639bbdf197e1b3467195
|
2025-11-09 06:32:10 +00:00 |
|
stephan
|
bb3b269ba9
|
Add new file missing from [936990cf067a5ebb] (and subsequently deleted by fossil clean -x). Have speedtest1 wasm use the user-provided sqlite3.c, rather than forcing the canonical one, so that the wasm exports don't have to be re-generated for that special case. Remove a harmless duplicate -D... flag.
FossilOrigin-Name: 7a592f5cd09699b45051855f6d477def40220b17642cbdb0f35ed74dd32becf1
|
2025-11-03 21:26:27 +00:00 |
|
stephan
|
c129de05bb
|
Simplify the EXPORTED_FUNCTIONS lists to use the preprocessor instead of per-list shell commands. (Unrelated) Remove part of the post-compilation JS filtering which breaks with emsdk 4.0.16+, which means the .js files are about 57kb bigger than they really ought to be.
FossilOrigin-Name: 936990cf067a5ebb34f7f662fc2d23d468c50f179afafe47fe0d2ed775f5ef74
|
2025-10-30 20:18:20 +00:00 |
|
stephan
|
bc5e0be7f8
|
A experiment addressing the embedded-NUL behavior of sqlite3_colum/value_text() in the JS bindings, as discussed in [forum:d77281aec2df9ada|forum post d77281aec2]. This is an experiment only. It works, in that existing tests do not see the difference, but it has implicications which require careful consideration before deploying.
FossilOrigin-Name: d0e803b90344ee972e4b3fb30b77e283599dc4d5c6a3335ce9fea653a1b3f6f0
|
2025-10-30 02:21:38 +00:00 |
|
stephan
|
02c5f3976f
|
Random tiny tweaks in internal JS and flesh out the tester1 test selection list to include both 32-/64-bit entries for all tester1XYZ.html combinations. For after the 3.51 release.
FossilOrigin-Name: c087a1d23deac84ac46e769332ec167c5b38fc8e525fd90484d3fa0b6d304ffa
|
2025-10-24 21:01:23 +00:00 |
|
stephan
|
e826aa8e00
|
Minor JS doc updates. No code changes.
FossilOrigin-Name: fc2a026901b1a12526b92fff36d7acc226e554c9f351e6261c7ffd4887bcc337
|
2025-10-15 23:28:31 +00:00 |
|
stephan
|
d6cb2ccee6
|
JS/WASM: Expose sqlite3_db_status64(), sqlite3changeset_apply_v3(), sqlite3changeset_apply_v3_strm(), and SQLITE_DBSTATUS_TEMPBUF_SPILL.
FossilOrigin-Name: b13eafc9b6820517b450041a7e2be573a896b5b9e88b2b28df9f15e3cb91e23d
|
2025-10-14 18:23:32 +00:00 |
|
stephan
|
b4fdfc2f9a
|
Update c-pp.c and rename it to c-pp-lite.c to match its new upstream name. Adapt the JS files and mkwasmbuilds.c for c-pp syntactic changes.
FossilOrigin-Name: bb13e46ddfcd1d3ca73845430d9a91c0ea3913762d39bbd94127783d77e4f63b
|
2025-10-09 15:28:59 +00:00 |
|
stephan
|
0df9db4921
|
Make use of the new SQLITE_ENABLE_PERCENTILE in the wasm build.
FossilOrigin-Name: 937c084c2d9b20fde2d54e48257cb7018bd8c36d6f00ed6f1659b5ecc2f48ed4
|
2025-10-08 18:17:19 +00:00 |
|
stephan
|
436c8e5026
|
Remove the long-defunct wasmfs build of speedtest1 from index.html and re-enable the wasmfs scratchpad app (which still works). Fix the CFLAGS for the wasmfs build and the path to the wasm file for one of the JS.
FossilOrigin-Name: acaaf8cce9e780bf937436b4c987ed284aa0bba6f5ca9508d9dbad598af2991d
|
2025-09-28 18:03:29 +00:00 |
|
stephan
|
0b0c8734f3
|
Improve #if support in, and add #assert to, c-pp. Rename target=... preprocessor symbols to target:... because changes in the semantics for symbols which have an '=' makes some of those #if blocks mutually exclusive (which we won't want in rare cases involving the bundler-friendly builds).
FossilOrigin-Name: 54287487793d48f6dde919446ab7476aea0cc0aba3835c80f060a7b84221881a
|
2025-09-28 00:53:00 +00:00 |
|
stephan
|
96c753ec56
|
Reinstate the Module.instantiateWasm() override and simplify how the wasm filename gets injected into the JS files.
FossilOrigin-Name: e878ffd2eaa87e2978c44fcd03a1eb6114a9ae31e31101898d682f43cf81000f
|
2025-09-26 17:11:39 +00:00 |
|
stephan
|
c1254430d8
|
Build cleanups and dead code removal.
FossilOrigin-Name: b516109e5accc885b71900402c800ae855407552648861334c895f0e5dea4ee5
|
2025-09-26 01:38:07 +00:00 |
|
stephan
|
6d3ae03f1e
|
Get the tester1 worker1/promiser demos building again. Show WASM heap usage in tester1 if.
FossilOrigin-Name: 6691a84872f823c95b0bdc3db8e12d21c9561aa1e1ce1d787a977f2c5ef8225a
|
2025-09-24 20:39:08 +00:00 |
|
stephan
|
5c01f3fb83
|
Further wasm build refactoring. Get speedtest1 building again.
FossilOrigin-Name: 5434307dcd927686ce827da22de55020c4b431f888ac81ae3634d458ad0b563d
|
2025-09-24 06:43:24 +00:00 |
|
stephan
|
a8bddde325
|
Slight correction to the diagram in the previous checkin.
FossilOrigin-Name: 6455af2703e78fb9b6df19cf4b46873d98ec91c3302dc0093a362d03ac48da91
|
2025-09-23 00:24:58 +00:00 |
|
stephan
|
b19c14742d
|
Add a high-level diagram showing how sqlite3.js gets assembled.
FossilOrigin-Name: e0dfa1e62ba6d71abe1f48969eb6f53c83f2c28d47b996ee223587d923cc282f
|
2025-09-22 23:48:05 +00:00 |
|
stephan
|
e55a29f5fd
|
Refactor and simplify the JS API bootstrap steps.
FossilOrigin-Name: a4f36fd93738f985d2c757c69eddca092732ce6148af98eb2595f9abe0d4fa44
|
2025-09-22 21:04:24 +00:00 |
|
stephan
|
cfa48c17f7
|
Update ext/wasm/api/README.md for recent changes.
FossilOrigin-Name: 03b70686939e5f9ad984220a31674c23a1beb19f040c6327f24e23f0378555da
|
2025-09-22 18:05:10 +00:00 |
|
stephan
|
1ab3d7eafd
|
Cleanups and docs in the internal parts of the JS lib bootstrapping. More tinkering with the custom (but still disabled) wasm file loader.
FossilOrigin-Name: 35651d9ab5529da915500fc50ca3833a004d0b7a19d98e8fbf39234d94697aec
|
2025-09-22 17:29:52 +00:00 |
|
stephan
|
34d92f4ac6
|
Minor doc updates. No functional changes.
FossilOrigin-Name: 9c67299b452a2b19b5f4285feb975b30864a9415ccf62b7c7ebb1587a6545b33
|
2025-09-22 11:52:06 +00:00 |
|
stephan
|
5a2e3c4af2
|
Experimenting with a custom wasm loader, but don't enable it without an explicit build flag. The goal here is to make the WebAssembly.Module object available internally (the default loader hides it from us).
FossilOrigin-Name: e5f0256feab95c30a8e3e1e69963fb3e25ed2da296aff5bc6646fe96a76c0b81
|
2025-09-22 02:40:06 +00:00 |
|
stephan
|
1e01174ac3
|
A minor optimization in wasm.realloc().
FossilOrigin-Name: 6a070f450ac9ee3d4d6a3e05ef8fa2071a684181ea160805e236c3bba226510a
|
2025-09-21 22:17:13 +00:00 |
|
stephan
|
589855f40e
|
Improve db-close-time cleanup in the face of WASM environments which wrap wasm.exports in nullary wrappers.
FossilOrigin-Name: fbb63634eab83fda0090fe2c38bda735b497fd6e57dd36344559962e396dbb17
|
2025-09-21 21:37:44 +00:00 |
|
stephan
|
e6db55f0e2
|
Fix a Number/BigInt descrepancy in oo1.DB() when passed a WASM-string db filename. Consolidate some duplicated internal code and adjacent minor cleanups.
FossilOrigin-Name: d078aff7817ccd4f891024e55703519307a53815d472086bf3d42b2be28698b3
|
2025-09-21 21:17:41 +00:00 |
|
stephan
|
b10548a7b0
|
General cleanups and dead code removal.
FossilOrigin-Name: 0336fa95e15c53ac6ab8152a840163a5aac64725874ffb848ce1d95e3af90586
|
2025-09-21 19:39:06 +00:00 |
|
stephan
|
cf0f11ac18
|
Remove some dead code and stray debug output. Fix (again) the JS SQLTester for 64-bit (the previous build was set to 32-bit).
FossilOrigin-Name: a6b9567001dad0293dc6a7fe9a7ec1a220e41d9426448e2ab91dbd551948be15
|
2025-09-21 19:01:15 +00:00 |
|
stephan
|
5b71447e8e
|
Generic cleanups and simplifications in JS code.
FossilOrigin-Name: 074cf4e6c1775900204bb0d920111ee19601d5c63690e79e988e7fe6b040a647
|
2025-09-21 17:55:23 +00:00 |
|
stephan
|
128ae8ea3f
|
Rename wasm config entry pointerSizeof to pointerSize for consistency with wasm.ptr.size.
FossilOrigin-Name: 2cd8ba740f9b14dc1408b62632c603076b070dc412bf7cbfb3b525f0c4912371
|
2025-09-21 14:25:29 +00:00 |
|
stephan
|
1e2156e926
|
Restructure the interface for the sqlite3.wasm pointer-size-dependent details.
FossilOrigin-Name: 8ac12e1f5144380d4ecc8b27a1f62dcda0e5a86409ae7149f62c33caeea19a23
|
2025-09-21 13:53:59 +00:00 |
|
stephan
|
51127416a4
|
Resolve the non-functional 64-bit JS vtabs and VFSes. All wasm tests now pass on a 64-bit build. Investigation of the fiddle failure on a second db import is still pending.
FossilOrigin-Name: 7c44b48b628d3d93b13031e9fd08ed39fec35c661aca9e813a89348d6c415663
|
2025-09-21 00:59:23 +00:00 |
|
stephan
|
d1b64404b3
|
Determine the WASM environment's pointer size at runtime instead of baking it in at build-time via the preprocessor.
FossilOrigin-Name: 21ac6aaa03517841b637924720354b9800d6e8b7bd5f6ee54a99f5f45b2ccdec
|
2025-09-20 23:21:24 +00:00 |
|
stephan
|
3e205eff8e
|
Add missing sqlite3_vtab::xIntegrity wasm mapping. Correct signatures for the (unused) xDlOpen and xDlError bindings. Disable OPFS-related tests in tester1.js in 64-bit builds.
FossilOrigin-Name: a106be90a2dba7476e54dbb4bdf47d0999031dae0ca82d73e51a48dadd6bcdc0
|
2025-09-20 22:10:59 +00:00 |
|
stephan
|
25e416dc3a
|
Reinstate the working-again commit/rollback/update hook tests. The bug breaking those was the one-letter change at the top of this diff.
FossilOrigin-Name: c582513a77cd1d1d9479e5a4518ddf15ef5a213bed1bfb6af9bd21bf3be41f8a
|
2025-09-20 21:03:28 +00:00 |
|
stephan
|
7462b3749a
|
Further tweaks towards 64-bit wasm. Fiddle is failing intermittently from the C level when importing a db and it's not yet clear what's happening there.
FossilOrigin-Name: 9fd82ebe31993c11e61a47205b7fc17a28283ec96cf278df1b6ea8a196d1fcb1
|
2025-09-20 20:23:59 +00:00 |
|
stephan
|
832dfd97d1
|
Get all but 3 of the tester1.js test groups running in 64-bit builds. The outliers are virtual tables and commit/rollback/update hooks.
FossilOrigin-Name: c135d9743698b3331e56f72160e2b78840aa2c8fa1a70daea9d4a0952dbda186
|
2025-09-20 18:51:10 +00:00 |
|
stephan
|
a8756afdbc
|
Get several hundred more lines of tester1.js running in 64-bit mode.
FossilOrigin-Name: f5105ee5defa042508a68a1f4e23b9fff46a1697b1a727e01c3edea3030fbcb5
|
2025-09-20 17:11:57 +00:00 |
|
stephan
|
a2daecfc8c
|
Further work on 64-bit WASM builds. It now gets through just shy of half of tester1.js.
FossilOrigin-Name: c8deed31365898e1379d577298fc80ef08a5531999d5b54a9f14337febed0260
|
2025-09-20 15:16:55 +00:00 |
|
stephan
|
bd5d297fec
|
Get the wasm tests running in a 64-bit build up through (but not including) the oo1 bits.
FossilOrigin-Name: a5af46174a05e1414370884d1a99827af9286a60eff1c8ae1551e7fad3903f7a
|
2025-09-20 11:09:20 +00:00 |
|
stephan
|
22f9ca64db
|
Get about 1/3rd of the tests running with MEMORY64=1, but the code noise level added by the BigInt/Number discrepancy is making this very unattractive. There are apparently irreconcilable differences between MEMORY64=1 and 2, in that they have different argument type expectations for methods such as WebAssembly.Table.get(), where MEMORY64=1 requires a BigInt a MEMORY64=2 requires a Number. We have no way to make that distinction from the JS code, and don't know what other APIs are affected by that quirk.
FossilOrigin-Name: 1e3b003ff99d2788d93e179504b711cb78846605774bf472589440d0136f20fa
|
2025-09-20 03:02:36 +00:00 |
|
stephan
|
6a03f2029b
|
Baby steps towards 64-bit pointers. Get it building and testing again in 32-bit builds.
FossilOrigin-Name: f35bb66e3eb939d321afb3545c184013633ce35fa4cbd67b6be17a64997ece9d
|
2025-09-20 00:43:47 +00:00 |
|
stephan
|
d6403a2d2e
|
Initial experimentation with a -sMEMORY64=1 wasm build (full 64-bit). This compiles but does not pass tests due to friction between BigInt and Number types (e.g. Number(null)===0 but BigInt(null) throws, many functions are fussy about which of those types they'll take, and we cannot simply mix and match the two types transparently (1n+1 is not legal (but 1n>=1 is), so we can no longer do pointer arithmatic without hoop-jumping)). The library bootstraps but it's failing early on in tests due to this friction.
FossilOrigin-Name: cfd5c746a6111f49c9c83a56c3ef65223456306f2de6e20b36b1ca0c98b593e9
|
2025-09-19 23:21:00 +00:00 |
|
stephan
|
78202b9a3b
|
Add some comments describing the ways in which building sqlite3.wasm with -sMEMORY64=(non-zero) fails.
FossilOrigin-Name: 0b14fd35ca37075bb65b2ab398f3324dc851347b1c042566eac23724013653f8
|
2025-09-19 20:10:05 +00:00 |
|
stephan
|
d4cc844a2b
|
Diverse cleanups and docs in the JS and kvvfs pieces. Functional changes: (A) ensure that the 'i32' JS/WASM func arg/result conversion works properly with a 64-bit-memory WASM build (which we neither use nor test but [https://webassembly.org/news/2025-09-17-wasm-3.0/ | the newly-ratified WASM 3.0] brings within potential reach). (B) Fix sqlite3_js_posix_create_file() to not deallocate its input array if the client passes in raw memory (the library has never used it that way but the API permits it).
FossilOrigin-Name: 79af65a694fbbb3d501fb2ebd835c259ca644e0dafdd71eeb9f0a7c0e9128a1e
|
2025-09-19 17:24:47 +00:00 |
|
stephan
|
194d6edeb6
|
Wasm: (A) diverse internal doc updates. (B) when generating automated JS-to-WASM function proxies for converters which require an additional middle-man proxy, e.g. sqlite3_exec(), use the client-provided function, not the proxy function, as the cache key, to keep from re-generating the conversion in some common use patterns.
FossilOrigin-Name: 5e5139c2a162562cee0071d03954ebc0b8938da0b045ec3f5eba32dc8e19604d
|
2025-09-19 14:21:09 +00:00 |
|
stephan
|
c35f07ec2f
|
Diverse internal cleanups in the JS/WASM pieces. A potential fix for a hypothetical db-close-time resource leak of a subset of automated JS-to-WASM function conversions in Safari. That browser exposes WASM-exported functions via nullary wrappers, which causes a handful of them to misbehave (not clean up) at sqlite3_close_v2()-time.
FossilOrigin-Name: fabbc8b6d184d52a513e80fabd900f578424fc8a8055e3d64fac54b9e28ea18a
|
2025-09-15 14:11:55 +00:00 |
|
stephan
|
6b8d7ac599
|
Expose the new sqlite3_set_errmsg() to wasm. Refactor JS's sqlite3__wasm_db_error() to wrap that instead of the WASM-specific routine which previously did that job. This resolves the TODO added in [ead8a3a94e].
FossilOrigin-Name: e447a50f3a3791c264a68000948daa64edb1857d51d256fbd1ff0f2c2b330d5e
|
2025-09-14 12:14:42 +00:00 |
|