Documentation / Node
Keep the mount optional in JavaScript.
The napi-rs package exposes the same split-store idea to Node: select metadata and blocks independently, set a chunk size, and release the filesystem explicitly when the process is done.
const { createChunkedDriver } = require('./integrations/mount-rs-napi');
const fs = await createChunkedDriver({
metadata: { kind: 'sqlite', uri: './metadata.sqlite' },
blocks: { kind: 'sqlite', uri: './blocks.sqlite' },
chunkSize: 65536,
});
try {
await fs.writeFile('/hello', Buffer.from('hello'));
} finally {
await fs.shutdown();
}Factory choices
Namespace, leases, revisions, and publication.
Immutable bytes and the barrier before publication.
shutdown()Releases provider-owned writer leases explicitly.
In createChunkedDriver, metadata must use memory, SQLite, or PGlite. R2 supplies immutable blocks; it is not a metadata store.
Read the package, then read the caveats
The example mirrors the repository README and the generated TypeScript declarations. Provider configuration is not a promise that every combination has passed the full acceptance matrix: live credentials, service restart, SQLite hosting, and platform-specific gates remain separate evidence.
Source links: Node declarations, N-API implementation, and the README example.