WasiPreview1FsOptions
Defined in: packages/pgwasm/src/opfs/wasi/preview1.ts:190
Properties
Section titled “Properties”client
Section titled “client”
readonlyclient:RepackedSyncClient
Defined in: packages/pgwasm/src/opfs/wasi/preview1.ts:192
The synchronous broker client this adapter turns WASI calls into.
fdBase?
Section titled “fdBase?”
readonlyoptionalfdBase?: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.
memory
Section titled “memory”
readonlymemory: () =>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.
Returns
Section titled “Returns”ArrayBuffer | SharedArrayBuffer
readonlyoptionalnow?: () =>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.
Returns
Section titled “Returns”bigint
onError?
Section titled “onError?”
readonlyoptionalonError?: (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.
Parameters
Section titled “Parameters”string
unknown
Returns
Section titled “Returns”void
preopenFd?
Section titled “preopenFd?”
readonlyoptionalpreopenFd?: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.
preopenPath?
Section titled “preopenPath?”
readonlyoptionalpreopenPath?:string
Defined in: packages/pgwasm/src/opfs/wasi/preview1.ts:202
The directory that preopen names. Defaults to the store root.