ump-plugin-worker
v0.0.1
Published
UMP Worker Plugin — in-process Web-Worker-style API backed by a sibling JSEngine
Readme
ump-plugin-worker
In-process Web-Worker-style API for UMP apps, backed by a sibling
JSEngine + std::thread on the C++ side. Headless plugin: no view,
no RegisterAll wiring; the JSI bridges are registered from the
plugin's C++ static initializer via binding_registry.
Install
npm install ump-plugin-workerUsage
import { Worker } from 'ump-plugin-worker';
const w = new Worker(`
onmessage = (e) => postMessage({ doubled: e.data * 2 });
`);
w.onmessage = (e) => console.log(e.data); // { doubled: 84 }
w.postMessage(42);
w.terminate();Migration from ump-native
- import { Worker } from 'ump-native';
+ import { Worker } from 'ump-plugin-worker';No JS API changes.
