Skip to content

Type Alias: KernelDef

KernelDef = { kind: "core"; } | { kind: "js"; run: (image, params, ctx) => RgbaBuffer | Promise<RgbaBuffer>; } | { export?: string; kind: "wasm"; module: () => Promise<WebAssembly.Module>; }

Defined in: packages/core/src/plugin.ts:66

Union Members

Type Literal

{ kind: "core"; }

First-party only: the kernel is compiled into the core wasm.


Type Literal

{ kind: "js"; run: (image, params, ctx) => RgbaBuffer | Promise<RgbaBuffer>; }

Plain JavaScript. Determinism is the author's responsibility.


Type Literal

{ export?: string; kind: "wasm"; module: () => Promise<WebAssembly.Module>; }

Separate WebAssembly module implementing the kernel ABI.