basho / erlang_js

A linked-in driver for Erlang to Mozilla's Spidermonkey Javascript runtime.
Apache License 2.0
238 stars 88 forks source link

[RFC][W.I.P.] Build with js-1.8.5 #32

Open lemenkov opened 11 years ago

lemenkov commented 11 years ago

Currently erlang_js uses a very old js library - 1.8.0-rc1 (a pre-Firefox4 library from the year 2009). It also builds against a very old nspr (older that version shipped with RHEL5) but that's another story.

My fellow Fedora Project members and contributors ported all codebase to js-1.8.5 which claimed to be much faster than previous versions:

I'd like to share this preliminary work with you in hope that it could be useful.

This particular pull request consists from only two patches and DOES NOT intended for merge (again BEWARE! DO NOT merge it blindly!). The former patch removes almost all js/nspr-related stuff and ensures that erlang_js will be built against system-wide libraries instead - so it's probably not what you really want since it could break building on some rare Unix species (xBSD, namely). I added it just for the reference. The latter one does the actual job.

I'm looking forward to hearing from you - any comments and suggestions are welcome. No seriously - these js and nspr tarballs are awfully old. Let's upgrade them!

dizzyd commented 11 years ago

Hi @lemenkov -- we're certainly interested in getting a more recent spidermonkey in erlang_js. As you noted, though, we don't want to link against the system-wide js/nspr to ensure we can support more exotic BSD/Solaris/etc. Is there a middle ground here?

sebastian commented 11 years ago

Hi @dizzyd, Are there any plans regarding when/if the version of SpiderMonkey used in erlang_js will be updated?

Thanks!

Sebastian

lemenkov commented 11 years ago

Hello @sebastian, So far it works on my Linux box - feel free to try it out and report about results. Actually I do encourage you to try it :)

jonmeredith commented 11 years ago

@sebastian as Dizzy said we'd like to update it - but need to make sure it'll run on all our supported platforms. We have our resources tied up on features for the next release and will review once we have some capacity.

superstructor commented 11 years ago

Note SpiderMonkey 17 (corresponding to the Firefox 17 release) has since been released.

https://developer.mozilla.org/en-US/docs/SpiderMonkey/17 http://ftp.mozilla.org/pub/mozilla.org/js/mozjs17.0.0.tar.gz

The version currently is Riak is very slow in comparison and missing many important APIs e.g. Object.keys and strict mode support.

Please consider assigning some resources to this as JavaScript Map/Reduce is one of Riak's best features!

Cheers

cmeiklejohn commented 10 years ago

@lemenkov Is there anyway this could be rebased with just the latter patch that doesn't rely on the system provided libraries?

marianoguerra commented 10 years ago

hi! I made a new pull request to update to spidermonkey 17, it doesn't rely on system provided libraries as noted in the comments above.

https://github.com/basho/erlang_js/pull/44

it still needs some work but I guess it's a good start.