Closed Bug 965370 Opened 11 years ago Closed 11 years ago

asm.js-compiled JavaScript code in mozilla-central

Categories

(mozilla.org :: Licensing, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: till, Assigned: gerv)

Details

In Shumway, we want to implement some functionality in asm.js. Since it's unrealistic to require Emscripten as part of the Gecko build process, I don't see a good way to do that without landing compiled asm.js code in mozilla-central. Given that it's not even allowed to land minified code, I assume that that's against our current policies. Assuming that's correct, what are our options? Could we land the compiled version alongside the source, with clear instructions on how to recreate the former?
Summary: asm.js-compile JavaScript code in mozilla-central → asm.js-compiled JavaScript code in mozilla-central
(In reply to Till Schneidereit [:till] from comment #0) > In Shumway, we want to implement some functionality in asm.js. > Since it's unrealistic to require Emscripten as part of the Gecko build process, So you are actually writing this code in C++, and compiling it using Emscripten into asm.js-subset JS? > Given that it's not even allowed to land minified code, Can you give me a source for this statement? > Assuming that's correct, what are our options? Could we land the compiled > version alongside the source, with clear instructions on how to recreate the > former? This seems reasonable to me, but your comment above makes me think other people have a different view. Gerv
(In reply to Gervase Markham [:gerv] from comment #1) > (In reply to Till Schneidereit [:till] from comment #0) > > In Shumway, we want to implement some functionality in asm.js. > > Since it's unrealistic to require Emscripten as part of the Gecko build process, > > So you are actually writing this code in C++, and compiling it using > Emscripten into asm.js-subset JS? Exactly. > > > Given that it's not even allowed to land minified code, > > Can you give me a source for this statement? Hmm, I was going by what Yury told me from his experiences with pdf.js. Yury, can you clarify this?
Flags: needinfo?(ydelendik)
Flags: needinfo?(ydelendik)
On another hand, Shumway's code is under Apache 2 license and Emscripten's fragments that are included during compilation is available under 2 licenses (?) (the MIT license and the University of Illinois/NCSA Open Source License), we shall be fine if we will not use any other C libraries required for compilation of our stuff. So we can include compiled/minifier version of Shumway as js-blob under Apache 2 license without providing original C or JavaScript code. Is it a correct assumption?
(In reply to Yury Delendik (:yury) from comment #3) > Found that at http://www.mozilla.org/MPL/2.0/FAQ.html#minified-js Oh, I see. I misunderstood, then. Neither is the MPL relevant for us at all, as we're Apache licensed, the MPL also wouldn't forbid what I outlined above: landing the compiled version alongside the source. I thought that we didn't allow minified code into mozilla-central as a matter of policy. But given that that's not the case, we should just go ahead and do Closure Compiler optimizations in both Shumway and pdf.js. Gerv, thanks for the advice.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
As a matter of policy, I would not want us to have code in the tree which was not available in the preferred form for modification, but I also understand that it's not reasonable for people building a Mozilla product to have every possible build tool available to them. So checking in the original source, the minified version, plus a Makefile or other automated method of rebuilding it (given the right tools) is fine. Gerv
You need to log in before you can comment on or make changes to this bug.