Skip to content

WasiPreview1FsOptions

Defined in: packages/pgwasm/src/opfs/wasi/preview1.ts:190

readonly client: RepackedSyncClient

Defined in: packages/pgwasm/src/opfs/wasi/preview1.ts:192

The synchronous broker client this adapter turns WASI calls into.


readonly optional fdBase?: number

Defined in: packages/pgwasm/src/opfs/wasi/preview1.ts:204

The first fd the adapter hands out, and the bottom of the range it claims. Defaults to 4.


readonly memory: () => ArrayBuffer | SharedArrayBuffer

Defined in: packages/pgwasm/src/opfs/wasi/preview1.ts:198

The guest’s linear memory, resolved on EVERY call. A shared wasm memory grows underneath the host and any cached Uint8Array/DataView goes stale (or detaches outright, for a non-shared one), so nothing here holds a view across a call.

ArrayBuffer | SharedArrayBuffer


readonly optional now?: () => bigint

Defined in: packages/pgwasm/src/opfs/wasi/preview1.ts:206

The adapter’s clock, in milliseconds. Defaults to the wall clock; used for diagnostics.

bigint


readonly optional onError?: (call, cause) => void

Defined in: packages/pgwasm/src/opfs/wasi/preview1.ts:208

Where a JS exception that escaped a WASI call is reported. Defaults to console.error.

string

unknown

void


readonly optional preopenFd?: number

Defined in: packages/pgwasm/src/opfs/wasi/preview1.ts:200

The fd the guest sees the preopened directory as. Defaults to 3, the WASI convention.


readonly optional preopenPath?: string

Defined in: packages/pgwasm/src/opfs/wasi/preview1.ts:202

The directory that preopen names. Defaults to the store root.