Comment by duped

3 months ago

Be warned that V8 is a behemoth and adds 100+MB to your binary size, is quite slow to link, and is not practical to compile from source for most projects. If you want a lighter weight JS runtime there's quickjs, if you want WASM there's wasmtime.

Personally I don't think it's a good choice for what it seems Roto is used for (mission critical code that never crashes) since TS doesn't have a sound typesystem and it's still very easy to fuck up without additional tooling around it.

There's also Duktape for just JS minus the WASM (at least I don't think they've implemented WASM yet).

https://duktape.org/

  • I think QuickJS wins over Duktape for ES5 compliance, though it's been a few years since I was evaluating embedded JS. They're both extremely easy to integrate into an application, in contrast to V8

    • Fair, I'm not quite as familiar, but always like to bring up alternatives in case they're helpful. My favorite HN comments lead me to new alternatives for programming.