Re:WasmEdge
by mike_hearn on Wednesday November 30, 2022 @05:01AM
(#33798850)
You could take a look at GraalJS. It supports its own form of isolates and they can be created very fast, because an isolate setup is basically mmapping the pre-calculated heap into another area of memory and starting up another thread. I never measured it but it shouldn't be particularly slow. It also means you can mix languages.
Isolates are one option but I believe startup time for isolates with a snapshot is actually slower than Firecracker's snapshot restore.
Developing with Firecracker is somewhat annoying since it requires support for nested virtualization (doesn't work on Mac M1 or AWS, though does on GCP and GitHub Codespaces. The M2 has hardware support so development on Mac should work eventually.)
The various WebAssembly runtimes have really put a lot of work into getting fast snapshot restore with Wasmtime 1.0 doing so in microseconds. I'd love to be able to run server rendering in such an environment.