aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api
Commit message (Collapse)AuthorAge
* Add build of sqlite3.mjs (ES6 module), add a test app for it, and include it ↵stephan2022-11-19
| | | | | in the dist build. FossilOrigin-Name: 2e783670e10b59e67c14b0db7f4803b41790cc7730de221d54fa2d4483cfba33
* Integrate a custom preprocessor to the JS build process to facilitate ↵stephan2022-11-19
|\ | | | | | | | | creation of both vanilla JS and ES6 Module builds from the same source files. There is still some build-level reworking pending to make an ESM build a first-class deliverable. FossilOrigin-Name: 10c723d96d61d2e552ec1102563d58f1eb11bc3d30e03606fd8e0279c5a9043a
| * More work towards creation of a ES6 JS module.stephan2022-11-19
| | | | | | FossilOrigin-Name: 6b826e700f6849eebfbba38e5948b96be245994e3e03ea30743114d3f5689c42
| * Replace use of cpp with the fit-to-purpose c-pp to avoid cpp's ↵stephan2022-11-18
| | | | | | | | | | C-centric/JS-unfriendly quirks. FossilOrigin-Name: 49d70f071e918d5d095c807575bb7ce2b287a123261e789e938521b3b409429a
| * Merge trunk into js-cpp branch.stephan2022-11-17
| |\ | |/ |/| FossilOrigin-Name: e047b33d1fb7d6a32e967f03f9952249cd2da4d21dc301fe92bd7baa0da5d6a9
| * Experimentally use clang's C preprocessor to filter #ifdef's out of the ↵stephan2022-11-03
| | | | | | | | | | generated sqlite3-api.js, the goal being to see if we can feasibly use cpp to include ES6 module-specific code in the main code base and conditionally filter it out. FossilOrigin-Name: 718a6d371e61359d73c8f80afdb248e3d9b4d8df4c4e5c122ac884344e31035b
* | Change a self.X JS reference to X to account for a symbol resolution ↵stephan2022-11-16
| | | | | | | | | | discrepancy between vanilla JS and ES6 modules, as explained in [forum:801d8f77e5115141|forum post 801d8f77e5115141]. FossilOrigin-Name: 0590de4da1103d842b9f9f25bcd2e69223b2ea067ae2f320f58dd3763218b39d
* | Remove some outdated code comments. No code changes.stephan2022-11-13
| | | | | | FossilOrigin-Name: 80ff592a9d0157bfa8bd1f9959c3aa26cab0ec16fdccf7b58a7523b8912c1a8c
* | Rework automatically acquired OPFS locks to be released during idle time. ↵stephan2022-11-10
| | | | | | | | | | This eliminates the performance hit reported in [46304ba057707c]. FossilOrigin-Name: a7fe91afca473fe55c983bc81d214df4ef3699863c7423fa4b6b9cde23d6a3b4
* | OPFS: if an op which needs a lock is called when no lock has been obtained, ↵stephan2022-11-10
| | | | | | | | | | automatically lock it at the start of the op and unlock it at the end of that op. This is an attempt to alleviate the cross-tab contention described in [forum post 58a377083cd24a|forum:58a377083cd24a] but it increases speedtest1 run time by approximately 4x. Perhaps auto-lock can be combined with the older idle-time-based auto-unlock to unlock such locks (but not those from xLock()) to improve this? FossilOrigin-Name: 46304ba057707c3b072b6e7bb8c4af774f653aa5814099f0866cd87b2b73abeb
* | Add sqlite3.wasm.alloc.impl() as a "public back door" into the low-level ↵stephan2022-11-07
| | | | | | | | | | non-throwing allocator. Correct sqlite3.WasmAllocError constructor to behave like its usages expect it to and add tests for that. FossilOrigin-Name: cea8bf9a144d842c4755c3130273524926e8c4831d7f21c4e34d4e8c74109c8c
* | Minor wasm doc touchups. No code changes.stephan2022-11-07
| | | | | | FossilOrigin-Name: 2c448368913a844bdb5e69f8fa3bad91a2b6612ba3b7f3f650dd07b81db25a77
* | Correct sqlite3-wasm.c's SQLITE_DEFAULT_CACHE_SIZE (it's measured in kb, not ↵stephan2022-11-04
|/ | | | | bytes). FossilOrigin-Name: 479ad980dfe509403e184e39a5aa441171e47b3297e05039f85516e72e9f15be
* Globally replace '' with "" for empty JS strings to please C preprocessor.stephan2022-11-03
| | | FossilOrigin-Name: e92e1f42bef94a1df29f66b4111ebfde93eba3759bc5d5a9c95f714508851346
* Minor build cleanups and fix a harmless race condition in the OPFS part of ↵stephan2022-11-02
| | | | | tester1.js. FossilOrigin-Name: 70ee6ee014bc4e2c1daa9b4a8909cf76ccecf32de1eb39055f20d3d0b1daa1bd
* Add sqlite3_wasm_vfs_create_file() to replace Emscripten's ↵stephan2022-11-02
| | | | | 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). FossilOrigin-Name: b35e1225c91a3cadc0d25af1e4e790237256d194990faa13190e343ed03e11c5
* Fix a symbol name typo which broke and exception-handling case in OPFS xOpen().stephan2022-11-02
| | | FossilOrigin-Name: 5bc83d569594e104e90b1acef1a5fd23655b2089de393a6776e799fdef2082f5
* Minor internal cleanups in the js pieces.stephan2022-11-01
| | | FossilOrigin-Name: 271391b4e32220ab4c32d69f579ecd2b03eb99da898955a1ef8fffc27216719d
* Significant cleanups and expansion of the sqlite3.opfs utilities. Add ↵stephan2022-11-01
| | | | | oo1.DB.dbVfsName(). Add VFS name to worker1:open's arguments and result. FossilOrigin-Name: 86a341d7e061f946b39e8647ddd4743013b851b33ae9e6e755d8dbc53fba5286
* Worker1: use a list, rather than a single slot, to manage the default db ↵stephan2022-10-31
| | | | | link so that we can keep the least-recently-opened db as the default. Re-introduce worker1.export() but do not yet expose it until an equivalent import() (or open() option) is implemented. FossilOrigin-Name: c7750c101d9b7baa31496731bc34ea0a9b2bad0c11e2b3e92a8c7b327135c1bb
* Internal tweaks to the OPFS VFS result codes.stephan2022-10-31
| | | FossilOrigin-Name: 32e1a2d2eb8738ae1635e413829f6cf7f64c63d2a86b72940a573de89948e529
* Add oo1.DB.exec() 'returnValue' option, which specifies what exec() should ↵stephan2022-10-31
| | | | | return. Defaults to the db object and enables direct return of the result rows array or a list of the individual SQL statements. Other code-adjacent internal cleanups. FossilOrigin-Name: 69d36a6aa5e2cd79d26c0fd3e0d20fe8838fd1be97db07725233bfff1dfe6643
* Add oo1.DB.selectArray() and selectObject().stephan2022-10-30
| | | FossilOrigin-Name: 7660db2a2e9c4f3a6a9343d6929744ad0f4be6820976411f9080165491da59b7
* Adjust automatic OPFS locking retries such that they will wait up to a total ↵stephan2022-10-30
| | | | | of 3 seconds spanning 4 attempts. FossilOrigin-Name: bbce49d81abc491ca666474040a53057e26e99131fea9449de253f88f4415ded
* Minor WASM build cleanups. Enable custom Module.instantiateWasm() when not ↵stephan2022-10-30
| | | | | in WASMFS mode (where it doesn't work). Add sqlite3.debugModule URL param to enable some module-init-time debugging output. FossilOrigin-Name: 50f678846a2b3c3d0818f0bae89f2ee86252a2e6a9c7029ebaae3953ca0fa14c
* Move the sqlite3.capi.wasm namespace to sqlite3.wasm. This causes a tiny bit ↵stephan2022-10-29
| | | | | of naming confusion with the sqlite3.wasm *file*, but seems to make more sense than having it as a sub-namespace of capi. FossilOrigin-Name: 3f16eb18d6186ca972fca952ccac18649e7a905213f589e53c0c9333e695448d
* Remove sqlite3_interrupt() from the WASM build, as it is essentially ↵stephan2022-10-28
| | | | | impossible to employ in JS's threading model. FossilOrigin-Name: e85387590061edbb6cdc04de792ab86f43afaa5c8d1b0792206cb5b481c7d76a
* Add ext/wasm/module-symbols.html. Adjacent minor JS touchups.stephan2022-10-28
| | | FossilOrigin-Name: 24f12e681e06e3b71a6ac9c82255fe0270953a74c711405841f7e385eeafe874
* Minor sqlite3.oo1 API reorg prompted by documenting.stephan2022-10-28
| | | FossilOrigin-Name: 55237924ca363c5a3e0f8c82620eb6626a98311615866197375a86876b9da3a1
* Minor doc typo fixes.stephan2022-10-27
| | | FossilOrigin-Name: ed8d3f25a4d6ac04d9f7918c791d8d2c6f23ce846278ca63f8fbadb7ea27369f
* Expose sqlite3_randomness() to WASM and add a custom binding for it which ↵stephan2022-10-27
| | | | | can populate a JS byte array. Add WhWasmUtil.isPtr(). FossilOrigin-Name: 333e67076b4bc967bb543ef8e265c63f6e3498c38ac121a7d1eff4a1d7a71c63
* Replace the newly-removed oo1.DB.getFilename() with DB.dbFilename() with the ↵stephan2022-10-26
| | | | | hope that the distinction from the dbInstance.filename property is clearer. FossilOrigin-Name: 0b80543d75504c733b73b32f73b96074a4b0cebad64e47032926a3fefee41726
* Remove oo1.DB.hasFilename() and getFilename(), as they are unnecessary.stephan2022-10-26
| | | FossilOrigin-Name: 75c546b982024bf2b527c85271111d54158cb010867f6e29fc89e86cc8457cc5
* Minor cleanups and doc improvements in the OPFS sqlite3_vfs proxy.stephan2022-10-25
| | | FossilOrigin-Name: 48645f7bcacf81c4149f26d20ee1752fbe93a02f96b85bd7e28bfa49322137e5
* Add SQLITE_DQS to the compileoptions_used list, per request in [forum post ↵stephan2022-10-21
| | | | | 8b1060122b|forum:8b1060122b]. Force DQS=0 in sqlite3-wasm.c. FossilOrigin-Name: fcd9e0dbe3226f3f7ccc15b11fc3aa3b8058571bef274c25a33e9753e22f7551
* Add kvvfs tests to tester1.js. Fix a scopedAlloc() misuse in oo1.DB ctor ↵stephan2022-10-21
| | | | | caused by refactoring earlier this morning (and caught by these new tests). FossilOrigin-Name: 8e0f001ab76de6dbc17295b9085f7f61ce274c43f8c432ea4d2ec3153d248ff3
* Add timing info and OPFS sanity tests to tester1.jsstephan2022-10-21
| | | FossilOrigin-Name: 99915b0076422487cdd181a54e55694404fba13e4a540329b5ede9e2c9e12532
* Expose sqlite3_vfs_unregister() to WASM and unregister kvvfs in Worker ↵stephan2022-10-21
| | | | | threads to avoid its unintended use there (in contexts other than local/sessionStorage). Correct registration of window functions, extend oo1.DB.createFunction() to support window functions, and add window function tests to tester1.js. Correct an incorrect 1-arg handling case for DB.exec(). Add per-test assertion counts to tester1.js. FossilOrigin-Name: f07ce15479b7224b0d1ba9f147a433136e70c1461aa667d2737d4a918f778f55
* Make semantics for UDF xFinal() result handling and error reporting handling ↵stephan2022-10-20
| | | | | more flexible. FossilOrigin-Name: 89f3e1982ec32c010af67d15ef780847df20de568669e5c9d02f3cf084f51330
* Add more JS tests. Flesh out the aggregate UDF tests to use ↵stephan2022-10-20
| | | | | sqlite3_aggregate_context() so that they can each be used multiple times in the same statement. Add sqlite3_js_aggregate_context() convenience helper. FossilOrigin-Name: 9d034ef5e1bab7c9651c2450dc85765fa6365d3f1414c711550de858ff8b3ece
* Rename sqlite3_web_... to sqlite3_js_... Document the worker1.close.unlink ↵stephan2022-10-20
| | | | | option. Fix unlink usage in speedtest1.html. Minor JS build cleanups. FossilOrigin-Name: ac9af71b72a749b0a040273a88480d56f49570b569389a4ea20cc055f494d8ff
* Rework sqlite3_wasm_vfs_unlink(), add sqlite3_wasm_db_vfs(), update some docs.stephan2022-10-20
| | | FossilOrigin-Name: cdd46858f0e63bc7bfce8e339b3db9efdec43b6443ee76563a847f53d0176831
* Minor internal JS cleanups.stephan2022-10-20
| | | FossilOrigin-Name: 818ef0b5c909e733b643455278f7cc45533178f1cc6617058c00ed64fa44896a
* Rename several demo/test files and include more of them in the end-user dist ↵stephan2022-10-19
| | | | | archive. FossilOrigin-Name: 9c85835f6f50eb3b1a2b89c817816335743f04440c48bfa05aa89ec519cc0d51
* Update the dist rules for this evening's js/wasm build changes and include ↵stephan2022-10-19
| | | | | an index.html specifically for the subset of apps included in the dist archive. FossilOrigin-Name: a0ef0f32e96638b502b3951e524d590bdfb09dd39be453686b075102da67b7db
* Apply considerable acrobatics to get the JS/WASM deliverables building to ↵stephan2022-10-19
| | | | | 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
* Considerable wasm/js build cleanups and reworking. Remove wasmfs builds from ↵stephan2022-10-19
| | | | | 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
* Minor tweak to get bring an edge case of oo1.DB.createFunction() into ↵stephan2022-10-16
| | | | | aggreement with its docs. FossilOrigin-Name: 8d59ccd9f357fbed0b0790508ca9027194fc4b0131029f9f460c7b4bde806a5f
* Add aggregate function support to sqlite3.oo1.DB.createFunction(). Change ↵stephan2022-10-16
| | | | | signature of the options object used by that function so that the callback property names match those of the corresponding C APIs. FossilOrigin-Name: a7db6e4b50beebfb1c97e0c4de49538d8199c166b18a0b1b175736c593128a00
* JS: add build-time-generated version info to the sqlite3.version object. ↵stephan2022-10-16
| | | | | Remove some stray debug output from tester1.js. FossilOrigin-Name: b5f462c2d85d503f6492ec20580d57cb4c926712f6306a6be764bd09d1f5e8b8