/ proof-of-concept / plate-mechanics-sim
Sign in
proof-of-concept / plate-mechanics-sim
plate-mechanics-sim / packages / core / src / runner / protocol.ts
18 lines · 549 BBlameHistoryRaw
1import type { SourceBundle } from "../generate/bundle";
2import type { PlainValue } from "./plain";
3import type { BackendInfo, GpuStages, RunResult } from "./types";
5export type ToWorker =
6 | {
7 type: "run";
8 id: number;
9 bundle: SourceBundle;
10 inputs?: Record<string, PlainValue>;
11 gpu?: GpuStages;
12 }
13 | { type: "info"; id: number };
15export type FromWorker =
16 | { type: "output"; id: number; text: string }
17 | { type: "done"; id: number; result: RunResult }
18 | { type: "info"; id: number; backend: BackendInfo };
↑↓ move↵openescclose