extension
4 functions / 0 types
Index
| Function | Description |
|---|---|
| load | Compile an uploaded WebAssembly component and return its extension ID. |
| reset | Interrupt an active run. The next run starts in a fresh sandbox. |
| run | Execute an extension in a fresh sandbox and wait for its exported run() to finish. |
| unload | Interrupt an active run and discard the compiled extension. Its ID becomes invalid. |
load
load(args: { component: Uint8Array }, transactionId?: string): Promise<string>Compile an uploaded WebAssembly component and return its extension ID.
Requires extension access at startup. Accepts up to 32 MiB and stores at most 32 extensions.
Returns Promise<string>.
component : Uint8Array
transactionId optional : string
reset
reset(args: { id: string }, transactionId?: string): Promise<void>Interrupt an active run. The next run starts in a fresh sandbox.
Returns Promise<void>.
id : string
transactionId optional : string
run
run(args: { id: string }, transactionId?: string): Promise<void>Execute an extension in a fresh sandbox and wait for its exported run() to finish.
Concurrent runs of one ID fail. Reset or unload interrupts a run. Execution errors propagate to the caller. Statements already applied by an interrupted run are not rolled back. At most four extensions can run simultaneously. Runs have a 30 second deadline. Host filesystem, environment, network, and stdin access are unavailable. The component can still submit engine statements.
Returns Promise<void>.
id : string
transactionId optional : string
unload
unload(args: { id: string }, transactionId?: string): Promise<void>Interrupt an active run and discard the compiled extension. Its ID becomes invalid.
Returns Promise<void>.
id : string
transactionId optional : string