Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

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

wants to merge 3 commits into


None yet
8 participants

lemenkov commented Sep 24, 2012

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 Sep 25, 2012

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?

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




lemenkov commented Oct 26, 2012

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 Oct 26, 2012

@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.

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


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!



cmeiklejohn commented Aug 25, 2013

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

marianoguerra referenced this pull request in marianoguerra/erlang_js Nov 19, 2013

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.


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

@cmeiklejohn cmeiklejohn added this to the 2.1 milestone Mar 24, 2014

lemenkov and others added some commits Oct 28, 2010

Fix building of linked-in driver
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Replace deprecated driver_output_term with erl_drv_output_term
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment