open-source-ideas / ideas

💡 Looking for inspiration for your next open source project? Or perhaps you've got a brilliant idea you can't wait to share with others? Open Source Ideas is a community built specifically for this! 👋
6.56k stars 221 forks source link

A wrapper library for JavaScript engines #45

Open KOLANICH opened 6 years ago

KOLANICH commented 6 years ago

Project description

There are plenty of modern JS engines:

Some of them have own shared libraries. Nearly all of them have terrible API incompatible with each other.

When you wanna embed a JS engine you may want to have the latest JS but not to update them. The solution may be an abstraction layer library doing the following:

So a dev just uses the library. And it works on any machine having any modern web browser. When a browser is updated the js engine is also updated, because the library uses the JS engine used by browser.

Relevant Technology

node.js has some abstraction layer allowing to replace v8 with chackra and spidermonkey

Haroenv commented 6 years ago

Would be interesting but a massive engineering effort I think

jnv commented 6 years ago

This is the point of N-API, though many native Node addons interact directly with V8. Also Ryan Dahl's Deno has interesting architecture which, theoretically, makes engine replacement easier.