aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api
Commit message (Collapse)AuthorAge
...
* Reorganization and renaming in the new VFS/vtab JS pieces.stephan2022-12-09
| | | FossilOrigin-Name: 1c2dda177a11fcc5b66e5554507c23ba4b9948a710b3bccfb26963b9851d40a4
* Further docs and minor cleanups in the JS virtual table helper.stephan2022-12-08
| | | FossilOrigin-Name: c31e7488ac1a6b957782b72bd026b1f0590637b631e44a1fdf1dedeb5c587819
* Ease-of-use/legibility improvements in the virtual table JS helpers.stephan2022-12-08
| | | FossilOrigin-Name: 54c7ad7e08bdb87579398ade366605bfa2e2538a94aabcc6e4cda8e173649760
* More work on the JS vtable tests.stephan2022-12-08
| | | FossilOrigin-Name: 51e3c3b569dce2097063d39dc484f44b2f98cad0a902ef66765ca4cdc3e06f47
* Got JS non-eponymous vtable working thanks to a hint from Dan.stephan2022-12-08
| | | FossilOrigin-Name: 750719b4981df62fa2ff3665e6f559ec760609ad2493495628295ad9ae6024fc
* Remove some dead JS code and tweak some docs.stephan2022-12-08
| | | FossilOrigin-Name: 0ee495452c014680697aa9035c245024df127a52d1820ab0e02580a015d96ecb
* Work on an alternate (slightly simpler) approach to binding JS vtabs. ↵stephan2022-12-07
| | | | | Non-eponymous vtabs are not working, for reasons as yet unknown. FossilOrigin-Name: 6a0fefb93bcccd950df211cf5c2f49660c7b92115dd01b2b508a4ab9e3ab3d23
* Add addOnDispose() method to Jaccwabyt and code-adjacent minor internal ↵stephan2022-12-07
| | | | | cleanups. FossilOrigin-Name: 6a2723fe3f28dd94328d901e64e1e9ee9a1b2e9eeaed6c54038a5b83c914db78
* JS vtables: add infrastructure related to accessing and modifying ↵stephan2022-12-06
| | | | | sqlite3_index_info. FossilOrigin-Name: 0d77c348039926c24e0fb50a7dc7e4b62895cd201c021f8e29832917e4b8b09f
* Remove deprecated symbol sqlite3.opfs.OpfsDb, which was renamed to ↵stephan2022-12-06
| | | | | sqlite3.oo1.OpfsDb on 2022-11-29. FossilOrigin-Name: 0ce51bed65d5e430364f74bf959fb76c42ac5eec0769490231d8c8110a1f388c
* Rename wasm.cstringToJs() to wasm.cstrToJs() for consistency with other ↵stephan2022-12-06
| | | | | wasm.cstr... APIs. FossilOrigin-Name: cbf483ea0ba3e6dc08ad7ed654380f818544b4c3cedfdb8aa848a83298268ceb
* Minor internal JS code/docs cleanups.stephan2022-12-06
| | | FossilOrigin-Name: 21331bdd36a91b07a687ffadce392dcf2ccd0fd824b35d9dd027d4289a40fc96
* Add a demonstration sqlite3_vtab/module implemented in JS, based on ↵stephan2022-12-06
| | | | | ext/misc/templatevtab.c. Add oo1.selectArrays() and selectObjects(). FossilOrigin-Name: 60482c97e02bc4cafefef281be0cf0bc8c5c53232162829c137f3f7a80cdc534
* Expose sqlite3_get/set_auxdata() to wasm. Minor test app CSS tweaks.stephan2022-12-05
| | | FossilOrigin-Name: 44659ad32a9fe6363badfc5dbb0bd51d6fb2ee1c8aa47b71e9cf3dbd631fde9e
* Export collation-related APIs and strncmp()/strnicmp() to wasm.stephan2022-12-05
| | | FossilOrigin-Name: c3c56d9b944fd0d806d8dad9f0c7be3d7a5441765310908872cc525d82ab6a33
* Export sqlite3_vtab_collation() to wasm. Rename 'flexible-string' JS ↵stephan2022-12-05
| | | | | argument adapter to 'string:flexible' for consistency. FossilOrigin-Name: 15f8042fddaeabab43dd187c463d3ccc56758cbf19bf2ca4837d9087a4850c1a
* Rename 'static-string' argument adapter to 'string:static'. Replace JS unit ↵stephan2022-12-05
| | | | | tests which were lost via editing a generated copy of tester1.js instead of the original tester1.c-pp.js input file. FossilOrigin-Name: 9d81d51d5a255b42f8416da850c992a9e4c8eebc940e0702a9262cfcaa6d7b2f
* Export sqlite3_bind/value/result_pointer() to wasm. Add 'static-string' ↵stephan2022-12-05
| | | | | argument converter to support the lifetime requirements of bind/result_pointer()'s string argument. Correct an endless loop in wasm.cstrlen() when passed a non-C-string argument. FossilOrigin-Name: a94552434a657376d5ce1831de05c1b15fb153020848cd825fb0df413c3baa70
* More work on the JS side of the virtual table APIs.stephan2022-12-05
| | | FossilOrigin-Name: cb9881ec001b0e2faf047e57acfd1722d2b546255a54e0f850f568edfe2df1cd
* Remove some dead code. Improve some error checks and comments.stephan2022-12-05
| | | FossilOrigin-Name: 6712fbe46a97867cea309f78a274edbb6bd166a505b41e18a580306da0e063db
* Initial infrastructure for adding virtual table/table-valued function ↵stephan2022-12-05
| | | | | support to WASM. FossilOrigin-Name: c202d7a0398b9aabc2babba5c4c91a313f32bbf37549d419775642bb4aa3936a
* Export sqlite3_result_zeroblob/zeroblob64() to wasm.stephan2022-12-04
| | | FossilOrigin-Name: a60e56627fc0ef8831429941d429ee02c6ee51ce5a2c1af581dc5bc5a00d911e
* sqlite3.wasm.allocFromTypedArray() now optionally accepts an ArrayBuffer as ↵stephan2022-12-03
| | | | | its argument. FossilOrigin-Name: 75a1a796f86d289c7275666fab19013934775dcccaed44a1a61d1749a6cb99c9
* Rename wasm.xWrap.resultAdapter() X:free entries to X:dealloc for ↵stephan2022-12-03
| | | | | 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. FossilOrigin-Name: d9807656f8a7c2a893d3f68ee5592f44826b8e999ae66f7d9000674b5c1b0207
* JavaScript: add sqlite3.wasm.realloc(), ↵stephan2022-12-03
| | | | | sqlite3.capi.SQLITE_MAX_ALLOCATION_SIZE, and related tests. FossilOrigin-Name: eeb84ba5de1152ef0f42105b8b285fdee9f5ad58281e60a4e0c8b1d6de1dead8
* Rework the oo1.DB's distinct-per-VFS post-open() step to accept either a ↵stephan2022-12-03
| | | | | batch of SQL or a callback function. Increase OPFS's busy timeout to 10s. FossilOrigin-Name: 9feefe253ac487cb52be6bdf91bdd305963266716baa08f2bf9505954ee76321
* Minor internal tweaks to the OPFS VFS. Resolve a missing result code which ↵stephan2022-12-02
| | | | | lead to a null deref in xFileSize(). FossilOrigin-Name: 57dd593ef0efa17dfb3a9f4eac36d5b8b879e271de817d8cd94a8c8b56d31870
* OPFS VFS: translate createSyncAccessHandle() exceptions which appear to be ↵stephan2022-12-02
| | | | | locking violations to SQLITE_BUSY. This seems to improve concurrency considerably even with a reduced retry count of 5 (was 6). FossilOrigin-Name: 0d36021d107d3afca190ad61c3380536ad0cc2d493d345d48f9f9c1191741128
* Correct the problem which triggered the rollback in [7eec635562f6]: an ↵stephan2022-12-02
| | | | | incorrect default db page size (not a multiple of 512 bytes). FossilOrigin-Name: e06e490c240aa56b616e6f0380b5d08abf06f35f9e683e5150c5ac464eae9e55
* Roll back the SQLITE_DEFAULT_PAGE_SIZE part of [c260895faacb34] because ↵stephan2022-12-02
| | | | | kvvfs does not work at all with a page size of 8kb. FossilOrigin-Name: 7eec635562f65592121d7ff0a31a7b4ff6cdfe38e657f326302ef851b3b37c3f
* sqlite3-wasm.c: code legibility and coding style tweaks. Increase ↵stephan2022-12-02
| | | | | SQLITE_DEFAULT_PAGE_SIZE from 4k to 8k, as that improves OPFS speedtest1 performance by roughly 12%. FossilOrigin-Name: c260895faacb3458c557778630756d02a8520c0f1864bddcf86cdd27ef4a42bd
* Expand JS tests for db export/import and document reason it cannot currently ↵stephan2022-12-02
| | | | | 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. FossilOrigin-Name: 75f610d3a4cf3d972220f9abc27cdf5990451e3835ceb9cf66973934004dfc5c
* Remove extraneous/unused sqlite3.oo1.version object. Add httpd makefile target.stephan2022-12-02
| | | FossilOrigin-Name: 8e4d30ac033a6d9019a7eeedfe788dc0120f565cef2ae8f09d2bf32eb94d8a33
* sqlite3_js_create_file() now accepts an ArrayBuffer data source. Add test ↵stephan2022-12-01
| | | | | for OPFS-based export/re-import. The (sqlite3*) argument converter now optionally accepts sqlite3.oo1.DB instances. FossilOrigin-Name: 14a84b67fb17e16a5691ea4bf7f374123ac73a361a5d3d0efca53788d2001e3a
* Reformulate and simplify some JS tests related to the previous checkin.stephan2022-12-01
| | | FossilOrigin-Name: 9ea2d3dcf798393a7fd231e199c0e2c6302949fe2a7f2573178fb0e50c78a2f4
* Expand "sqlite3_vfs*" JS-to-WASM function argument conversions to accept VFS ↵stephan2022-12-01
| | | | | names (JS strings) and capi.sqlite3_vfs instances. Implement sqlite3_js_vfs_create_file() to facilitate creation of file-upload features which store the file in VFS-specific storage (where possible, e.g. "unix" and "opfs" VFSes). Correct an argument type check in the SQLite3Error and WasmAllocError constructors. FossilOrigin-Name: e1009b16d351b23676ad7bffab0c91b373a92132eb855c9af61991b50cd237ed
* Rename some JS files from X.js to X.c-pp.js to keep the maintainer, and ↵stephan2022-11-30
| | | | | downstream build customizers, aware that those files contain constructs specific to the c-pp preprocessor and will not run as-is in JS. FossilOrigin-Name: 2eade7c7b17a186735c72974c11a34798a08364861d0f307e897ba765c0a93c7
* Install sqlite3_malloc/sqlite3_free() as the JS-side WASM allocator (as ↵stephan2022-11-30
| | | | | opposed to replacing C-level's malloc()/free() with them). All tests work and this eliminates the potential for allocator discrepancies when using the (de)serialize APIs. FossilOrigin-Name: 95c78f6b46e0d8efa4313061f47677479f48610b7a7261dc8d0fb1859aca2ad9
* Simplify how the OPFS VFS async proxy copies initial state sent to it from ↵stephan2022-11-30
| | | | | the synchronous side of the connection. Make the lock-wait time a multiple of the wait-loop timeout interval. FossilOrigin-Name: eddafafffa634a42ceeed70aa3fc58be130527612157a4bf4ff9e65c7f6dc26c
* OPFS VFS: remove an invalid TODO and fix a property name typo which caused ↵stephan2022-11-30
| | | | | xCheckReservedLock() to always report false. FossilOrigin-Name: 3b037caa2fa07b6c44c485574e9e5dc71f4a8e82bc902c1321bb0b918b139c74
* Rename some OPFS JS files. Prevent JS bindings of sqlite3_uri_...() from ↵stephan2022-11-30
| | | | | performing JS-to-C-string argument conversion on their first argument, as doing so is specifically illegal. FossilOrigin-Name: 79832808de2cbdba140ed9e0558f1502b51d131ab4315265315922cda7b748cb
* Refactor a significant chunk of the OPFS sqlite3_vfs init code into ↵stephan2022-11-30
| | | | | sqlite3.VfsHelper, and internal-use-only API encapsulating code relevant to creating new VFSes in JS. Intended to assist in pending experimentation with an alternative OPFS VFS. FossilOrigin-Name: e25d7b080a807e35b32cb885ea75b384130e5c6e936dfef783c5b45d9bfe77d8
* Doc and logging text tweaks in the OPFS async proxy and test app.stephan2022-11-30
| | | FossilOrigin-Name: 7ce8608e221924d2c7067687eb6eef0f3cab181d5b4132e55a67d8514b6ce94b
* sqlite3.oo1.OpfsDb: default to journal_mode=persist, as current tests show ↵stephan2022-11-29
| | | | | it to be marginally faster than truncate/delete in Chrome v109. Also increase default busy_timeout from 2 seconds to 3, admittedly on a whim. FossilOrigin-Name: d0c8fa30a31c691bc1be5e98d806eeb1e23a8fc6cd54d87e5c1b720aa936e707
* Minor internal cleanups and docs in the OPFS sqlite3_vfs.stephan2022-11-29
| | | FossilOrigin-Name: 61799b05ff232c2ac349169c27bfe7f8d9277366093b0c9dd2739828993b3066
* Internal restructuring of the OPFS sqlite3_vfs in order to facilitate ↵stephan2022-11-29
| | | | | certain experimentation and improve error reporting/hints if it cannot be activated. Deprecate the name sqlite3.opfs.OpfsDb, preferring sqlite3.oo1.OpfsDb for consistency with JsStorageDb and any future DB subclasses. FossilOrigin-Name: 0c5c51f4fb04a4b90c50ec9704cfea9a3fb7d7d0ee55c1b0d4476129188217a6
* Add an explicit warning about the current API-instability of the ↵stephan2022-11-29
| | | | | sqlite3.opfs namespace, which may need to be eliminated based on re-thinking of how the OPFS sqlite3_vfs is registered. Comment changes only - no code. FossilOrigin-Name: 0cb2fd14179397051a25d066256a553fc198656d5668c7010c016f2b8f495bf4
* Document an OPFS API change in Chrome v108 which does not break our code but ↵stephan2022-11-27
| | | | | does change several formerly async methods to synchronous. No code changes. FossilOrigin-Name: e9dd87e28a96eb6560943b9a2cb3cb0ff14698c96fe63865944dcfed73b67bd3
* OPFS VFS: add the opfs-unlock-asap=1 URI flag which tells the VFS to release ↵stephan2022-11-26
|\ | | | | | | | | implicit locks ASAP instead of during VFS idle time. This improves concurrency notably in the test app but brings a significant performance penalty in speedtest1 (roughly 4x slowdown). This is not the final word in OPFS concurrency, but gets us a step further. FossilOrigin-Name: 9542f9ce9e023b489e2d93661f719fb0751c1e28f72fded9d3c2156d5777e7b1
| * More work on the OPFS concurrency testing app.stephan2022-11-24
| | | | | | FossilOrigin-Name: c0458caca3508d5d252f9b5198bda4f51a5c1874540f014b17e409f2daab1706