3 ms·
How difficult would it be to port Firefox's javascript engine to embedded platforms?
by amelius 7y ago
How difficult would it be to port Firefox's javascript engine to embedded platforms?
- andoma 7y agoIn my experience (having embedded both spidermonkey and duktape) is that if embedding is not a primary use case for the engine it can get messy and complicated to update (lots of api breakage etc). This was the reason I switched from spidermonkey to duktape for my app. That said, it was probably five or six years ago. Perhaps things have changed since. I guess the takeaway is just that. If the engine isn’t maintained for embedding. Don’t use it as such.
- amelius 7y agoYeah, I guess JIT compilation to native code can also be a difficult issue.
- hajile 7y agoI've never tried, but Mozilla's example doesn't look that hard. https://github.com/mozilla-spidermonkey/spidermonkey-embedding-examples https://github.com/mozilla-spidermonkey/spidermonkey-embeddi... The big issue (like with v8) is binary size. Double-digit megabytes before you even start running code is unacceptable in a lot of environments.
- X-Istence 7y agoIt's a giant pain in the behind, if you can even get it to compile correctly.
- jupp0r 7y agoI have not tried SpiderMonkey, but embedding V8 is pretty easy.