tinypool icon indicating copy to clipboard operation
tinypool copied to clipboard

refactor: prepare custom runtimes

Open AriPerkkio opened this issue 1 year ago • 2 comments

Refactors internal runtime APIs. Preparation for making runtime APIs public for custom runtimes, e.g. Vitest browser mode runtime.

Codebase of piscina is really complex. 😢

AriPerkkio avatar Jun 23 '24 18:06 AriPerkkio

excited for this one, it means tinypool browser support soon?

Aslemammad avatar Jun 23 '24 20:06 Aslemammad

This (and the next PR that actually opens custom runtime API) does expand Tinypool's usage to such use cases. But for Vitest browser mode, @sheremet-va has a bit different idea. Tinypool would be used as orchestrator, and Vitest itself would provide the runtime layer that would use web sockets to communicate with browser entrypoint.

These changes also make it possible to add generic browser support into Tinypool. Pool itself has to run on Node though.

AriPerkkio avatar Jun 24 '24 05:06 AriPerkkio