40 Commits

Author SHA1 Message Date
Sebastian Jeltsch e08e648a0f Model DB transactions from WASM as a WASI resource and use a watchdog task to force unlock the DB after 60s.
This is implemented as a minor WASI world update, i.e. it's backward compatible. WASM guests build against future runtime releases (JS & Rust) will transparently use the new APIs w/o anychanges to user code.
2026-04-17 11:13:21 +02:00
Sebastian Jeltsch 5defef582f Fix invalid use of sqlean's SELECT define() in test setup. 2026-04-14 12:17:25 +02:00
Sebastian Jeltsch 3ab6f288c0 Update Rust and JS dependencies. 2026-04-08 14:05:45 +02:00
Sebastian Jeltsch 847697c069 Fix WASM "ATTACH DATABASE" and sqlite error unpacking. #221 2026-04-07 14:09:26 +02:00
Sebastian Jeltsch 4b0f33264a Update JS dependencies. Upgrade to TS6. 2026-03-26 11:21:16 +01:00
Sebastian Jeltsch e2609c2521 Update to vite8. 2026-03-19 10:48:28 +01:00
Sebastian Jeltsch 61eb0734a9 Update docs to astro6 and update JS dependencies. 2026-03-19 10:21:00 +01:00
Sebastian Jeltsch c3ead55a1f Fix HTTP method-based routing for JS/TS WASM components with ambgious paths. 2026-03-07 22:25:40 +01:00
Sebastian Jeltsch a47af08675 Avoid multiple calls to init() per init for Rust guests and share Sqlite function declarations between init and dispatch. 2026-03-06 12:43:12 +01:00
Sebastian Jeltsch 79a219bb3e Expose wstd::rand in rust guests. Add a few more integration tests. 2026-02-27 22:37:14 +01:00
Sebastian Jeltsch ada26e2a7b Update JavaScript dependencies. 2026-02-19 11:10:09 +01:00
Sebastian Jeltsch 9365d86d81 Streamline JS/TS WASM HTTP handler, introduce HttpResponse.(status|ok|text|json). 2026-02-18 23:57:05 +01:00
Sebastian Jeltsch 91e3984f53 Update JavaScript dependencies. 2026-02-06 13:03:35 +01:00
Sebastian Jeltsch 5b9b32e0ac Move sqlean/sqlite-vec loading to the CLI level and switch to maintained sqlite-vec fork: https://github.com/vlasky/sqlite-vec. 2026-02-01 11:04:22 +01:00
Sebastian Jeltsch 5898fc9dba Merge WASM-host implementations for HTTP/Job handlers and SQLite functions. Also extend SQLite function state life-cycle to persist and be shared. 2026-01-23 13:34:57 +01:00
Sebastian Jeltsch fd9a026631 Update JavaScript dependencies & and downgrade Astro (newer versions break our docs, client islands broken?). 2026-01-20 15:12:41 +01:00
Sebastian Jeltsch 217d95a927 Update JavaScript dependencies. 2026-01-15 21:58:33 +01:00
Sebastian Jeltsch 8cd343013b Update JavaScript dependencies. 2026-01-11 23:02:27 +01:00
Sebastian Jeltsch 0ab548e164 Update JavaScript dependencies. 2026-01-02 23:22:02 +01:00
Sebastian Jeltsch e804788e5c Update JavaScript dependencies. 2025-12-18 12:13:02 +01:00
Sebastian Jeltsch 80f2f5e514 Update Rust and JavaScript dependencies. 2025-12-15 14:47:54 +01:00
Sebastian Jeltsch 84254e2fed Introduce multi-DB support, i.e. Record APIs can be powered by TABLEs/VIEWs from different DBs. This can help with physical isolation and offer a path forward when locking bottlenecks are encountered.
It's still early days, e.g. the UI doesn't yet support creating new DBs. However it allows exploring, creating and altering schemas for existing DBs. For now use the config to register new DBs.

Changes:

* Config-driven life-cycle management for "extra" DBs, i.e. creation and migration-management.
* Completely rewire connection & schema access throughout, now using a ConnectionManager abstraction.
* Update SubscriptionManager to track subscriptions across multiple DBs.
* Per-DB file management.
* Improved error handling.
* Basic e2e tests including file handling.
* Update UI:
  * Explorer: show, create and alteration of schemas on non-main DBs.
  * SQL Editor: allow control over which DBs are attached to the connection.

This change is breaking: it affects how migrations are loaded from `<traildepot>/migrations/<db>/` and switches transaction default of batch endpoint to false (cheaper).

This change does not introduce a notion of multi-tenancy, i.e. create a per-tenant/user DB on the fly based on templates and corresponding traffic routing.
2025-12-12 11:48:30 +01:00
Sebastian Jeltsch e90d78e23b Update JavaScript dependencies. 2025-12-03 12:30:22 +01:00
Sebastian Jeltsch 3e288c5727 Be less chatty about uncaught errors falling out of WASM-user-code in release buidlds. 2025-11-13 23:02:36 +01:00
Sebastian Jeltsch 3f690b85ec Update Rust and JavaScript dependencies. 2025-11-13 13:12:58 +01:00
Sebastian Jeltsch 5809a600fd Version WASM component interface, break up into packages, and add a new API for custom SQLite functions. 2025-11-12 14:31:02 +01:00
Sebastian Jeltsch 106437ea6d Update JavaScript dependencies. 2025-11-09 07:57:15 +01:00
Sebastian Jeltsch 2308c8d622 Update JS and Rust dependencies. 2025-11-05 17:11:47 +01:00
Sebastian Jeltsch 8566b9ba96 Update JavaScript dependencies. 2025-11-03 10:59:06 +01:00
Sebastian Jeltsch 9e46a099d0 Stop encoding SQL values as generic JSON values (outside the context of the record API), i.e. for admin APIs and between WASM host/guest.
This lets us simplify the parsing and add back a lot of type-safety (including int64). As a side-effect, we basically had to complete reqrite the record insert/update handling in the admin UI.

Note, however, that this is a breaking change, since it touches serialization between WASM guests and host. Guest will need to be built against an updated guest runtime.
2025-10-21 16:40:45 +02:00
Sebastian Jeltsch 3bb22fc92b Use winch baseline compiler - instrad of cranelif - for WASM components in --dev mode. #161 2025-10-13 15:45:54 +02:00
Sebastian Jeltsch 940c329770 Update JavaScript dependencies. 2025-10-13 15:45:54 +02:00
Sebastian Jeltsch db945733e9 Update Rust and JS dependencies. 2025-10-06 22:53:04 +02:00
Sebastian Jeltsch 362e284d03 Remove WIT thread-id method after changing the execution model. 2025-09-30 17:22:01 +02:00
Sebastian Jeltsch 353b913fe3 Update JavaScript dependencies. Fixes #157. 2025-09-25 23:16:04 +02:00
Sebastian Jeltsch 5802219c39 Update JavaScript dependencies. 2025-09-18 15:57:52 +02:00
Sebastian Jeltsch ced96071f4 Update JavaScript dependencies. 2025-09-12 11:14:37 +02:00
Sebastian Jeltsch 4b9df89104 Update JS dependencies. 2025-09-09 20:45:28 +02:00
Sebastian Jeltsch 1fbf0f862e Add TypeScript WASM guest runtime and examples. 2025-09-09 18:22:33 +02:00
Sebastian Jeltsch f1ec808622 Add Rust WASM guest runtime and examples. 2025-09-09 15:39:38 +02:00