You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prove whether Executable.md can host a persistent SQLite Workspace directly in Deno, reuse Cloudflare Computer's filesystem implementation, and expose that filesystem to native subprocesses without running workerd.
This spike compares a Deno-local SQLite/FUSE topology with the bundled-workerd evidence in #347 / PR #348. It informs #346 but does not select a topology or implement <Workspace> from #218.
Source audit already established
Deno provides node:sqlite directly.
Cloudflare Computer's repository is MIT licensed.
packages/dofs is the authoritative SQLite filesystem layer. Its Database accepts a structural DurableObjectStorageLike containing sql.exec() and synchronous transaction support.
Cloudflare's own Node tests adapt packages/dofs to node:sqlite with SQLiteTestStorage; that adapter currently opens only :memory:.
SQLiteWorkspaceProvider exposes the same database through @platformatic/vfs and is the provider mounted by computerd.
packages/computerd contains the FUSE operation adapter, real FUSE mounting, and a userspace materialization/reconciliation shim.
@cloudflare/dofs and @cloudflare/computerd are private, unpublished workspace packages. Their source can be reused under MIT, but they are not stable npm dependency surfaces.
Importing the published @cloudflare/computer@0.1.1 entrypoint directly in Deno currently fails because its module graph contains the cloudflare: URL scheme.
The spike must preserve these distinctions: legal reuse is established; supported dependency reuse and Deno portability are not.
Questions to answer
Can a file-backed node:sqlite adapter in Deno satisfy Cloudflare DOFS's storage contract without changing its schema or filesystem primitives?
Can the runtime-neutral part of the published Computer package be tree-shaken/bundled for Deno, or must XMD pin/vendor packages/dofs source?
Can Cloudflare's SQLiteWorkspaceProvider and FUSE driver run in the Deno process through @platformatic/vfs and fuse-native?
Can a native subprocess use the mounted directory while reads and writes remain immediately visible through the Workspace filesystem API?
Can the compiled XMD artifact carry and materialize every required native addon/library, and what system FUSE installation or privilege remains required?
Which filesystem semantics and crash guarantees hold for closed files, flush/fsync, open write buffers, renames, deletes, and abrupt termination?
Is Cloudflare's userspace shim a viable portable fallback when FUSE is unavailable, and which coherence guarantees does it lose?
What does this topology gain and lose compared with bundled workerd?
Experimental slices
1. Direct persistent DOFS
Pin the exact Cloudflare Computer source commit and published package versions used by the spike.
Implement the smallest file-backed DurableObjectStorageLike adapter over Deno's node:sqlite.
Use Cloudflare's existing Database, schema initialization, and filesystem operations; do not reimplement the filesystem schema.
Exercise mkdir, writeFile, readFile, readdir, stat, rename, symlink, and rm.
Close the Deno process, reopen the same database, and prove the exact filesystem frontier survives, including create/delete/create.
Prove separate database paths and Workspace identities remain isolated.
2. Reuse boundary
Evaluate these approaches independently:
direct import from @cloudflare/computer;
a tree-shaken bundle that excludes or adapts Cloudflare-runtime-only modules;
a pinned vendored copy of packages/dofs; and
an upstream package/export change that makes DOFS consumable directly.
For each, record whether it works, how upgrades are consumed, whether MIT notices must be carried, and how much Cloudflare code XMD would own. Do not create an untracked source copy.
3. Native filesystem bridge
Construct Cloudflare's SQLiteWorkspaceProvider over the same file-backed database.
Adapt it through @platformatic/vfs exactly as computerd does.
Attempt to reuse the pinned Cloudflare FUSE operation adapter and mount code under Deno.
Run a native command through XMD's process capability with its cwd inside the mount.
Prove API writes are visible to the command and command writes are visible through the API without a push/pull copy step.
Compile a proof executable without workerd or an external Node runtime.
If fuse-native requires a native addon or shared library beside the executable, embed, materialize, digest-check, and load it explicitly.
Record results for Linux x64/arm64, macOS x64/arm64, and Windows x64 rather than inferring support from package names.
Name unavoidable host prerequisites: /dev/fuse, mount permissions, macFUSE/kernel approval, or missing Windows support.
Measure compiled size, extracted assets, cold start, warm start, mount latency, and basic file-operation overhead.
5. Durability and teardown
Test clean close/reopen, host SIGTERM, host SIGKILL, workload termination, SQLite WAL recovery, and a second host attempting to open the same Workspace.
Test writes followed by close, flush, and fsync separately from a process killed with an open dirty file.
Determine when Cloudflare's buffered FUSE writes become committed SQLite state.
Prove unmount and cleanup behavior for success, failure, and Effection cancellation.
Treat corrupt or unsupported schema state as an explicit failure; do not silently recreate it.
6. No-FUSE fallback
Run Cloudflare's userspace shim against the same persistent database.
Measure its reconciliation latency and demonstrate its documented limitations around conflicts, symlinks, metadata, watches, and large files.
Decide from evidence whether it is a supported fallback, a development-only fallback, or unsuitable for XMD.
Spike
Prove whether Executable.md can host a persistent SQLite Workspace directly in Deno, reuse Cloudflare Computer's filesystem implementation, and expose that filesystem to native subprocesses without running
workerd.This spike compares a Deno-local SQLite/FUSE topology with the bundled-
workerdevidence in #347 / PR #348. It informs #346 but does not select a topology or implement<Workspace>from #218.Source audit already established
node:sqlitedirectly.packages/dofsis the authoritative SQLite filesystem layer. ItsDatabaseaccepts a structuralDurableObjectStorageLikecontainingsql.exec()and synchronous transaction support.packages/dofstonode:sqlitewithSQLiteTestStorage; that adapter currently opens only:memory:.SQLiteWorkspaceProviderexposes the same database through@platformatic/vfsand is the provider mounted bycomputerd.packages/computerdcontains the FUSE operation adapter, real FUSE mounting, and a userspace materialization/reconciliation shim.@cloudflare/dofsand@cloudflare/computerdare private, unpublished workspace packages. Their source can be reused under MIT, but they are not stable npm dependency surfaces.@cloudflare/computer@0.1.1entrypoint directly in Deno currently fails because its module graph contains thecloudflare:URL scheme.The spike must preserve these distinctions: legal reuse is established; supported dependency reuse and Deno portability are not.
Questions to answer
node:sqliteadapter in Deno satisfy Cloudflare DOFS's storage contract without changing its schema or filesystem primitives?packages/dofssource?SQLiteWorkspaceProviderand FUSE driver run in the Deno process through@platformatic/vfsandfuse-native?flush/fsync, open write buffers, renames, deletes, and abrupt termination?workerd?Experimental slices
1. Direct persistent DOFS
DurableObjectStorageLikeadapter over Deno'snode:sqlite.Database, schema initialization, and filesystem operations; do not reimplement the filesystem schema.mkdir,writeFile,readFile,readdir,stat, rename, symlink, andrm.2. Reuse boundary
Evaluate these approaches independently:
@cloudflare/computer;packages/dofs; andFor each, record whether it works, how upgrades are consumed, whether MIT notices must be carried, and how much Cloudflare code XMD would own. Do not create an untracked source copy.
3. Native filesystem bridge
SQLiteWorkspaceProviderover the same file-backed database.@platformatic/vfsexactly ascomputerddoes.4. Packaging and platform requirements
workerdor an external Node runtime.fuse-nativerequires a native addon or shared library beside the executable, embed, materialize, digest-check, and load it explicitly./dev/fuse, mount permissions, macFUSE/kernel approval, or missing Windows support.5. Durability and teardown
flush, andfsyncseparately from a process killed with an open dirty file.6. No-FUSE fallback
7. Comparison with #347
Compare at least:
Acceptance
node:sqlitewith Cloudflare's existing filesystem schema and operations against an on-disk database.Non-goals
Dependencies