If there are no line breaks, you have made a minified optimized build. Try making a nonminified build by passing -g2 on the link line. Bugs can be reported to emscripten github repo issue tracker. On Jul 29, 2014 3:27 PM, <[email protected]> wrote:
> On second look, I see that it does seem to try to find out what > environment it is running in. A bug then, yeah. Where can I report it? > Additional problem: the .js file is all in one line, there are no line > breaks, I find it hard to find out where exactly the interpretation stops. > Help? > > On Tuesday, July 29, 2014 9:12:48 AM UTC+2, jj wrote: >> >> Sure, the aim is to be portable, which is why there are such test flags >> ENVIRONMENT_IS_NODE and so on. It sounds like you are hitting a bug of the >> generated code, where it doesn't properly detect that it is not running in >> node. Pull requests to fix such bugs are always welcome. >> >> >> 2014-07-29 9:41 GMT+03:00 <[email protected]>: >> >>> Could be, but this was merely the first of probably many dependencies. I >>> think, if the generated .js code were truly portable among the various js >>> implementations, emscripten would become even more popular, than it already >>> is. Are there tutorials on running emscripten-generated programs under the >>> various javascript engines? >>> >>> >>> On Monday, July 28, 2014 10:39:32 PM UTC+2, jj wrote: >>> >>>> You could try hacking through the execution, and removing those >>>> node-dependencies one by one to see how many there are. Does Rhino have an >>>> equivalent of argc/argv? Perhaps we just need to condition that line on >>>> ENVIRONMENT_IS_NODE? >>>> >>>> >>>> 2014-07-28 23:37 GMT+03:00 <[email protected]>: >>>> >>>> I've tried to run a generated .js file under rhino and it stopped at >>>>> the line: >>>>> >>>>> Module["arguments"]=process["argv"].slice(2) >>>>> >>>>> I think that's a node.js dependency right there. I have no idea how to >>>>> run emscripten-generated .js files under the various js implementations, >>>>> are there any tutorials? I think it would be hard, as node.js is closely >>>>> coupled with v8. About the .html file: probably there are no node.js >>>>> dependencies in the generated script? >>>>> >>>>> On Monday, July 28, 2014 4:19:06 PM UTC+2, jj wrote: >>>>> >>>>>> Not sure how well Emscripten applications run in env.js, but for the >>>>>> .html -> .js part, the code that you have in the default shell.html file >>>>>> is >>>>>> completely optional, and it's also possible to move all that to a >>>>>> separate >>>>>> file that is evaluated before the main .js, or prepend the contents to >>>>>> the >>>>>> beginning of the main .js file. >>>>>> >>>>>> What do you mean by node.js dependencies? Do you refer to Rhino >>>>>> having node.js dependencies? Or Emscripten-compiled output has node.js >>>>>> dependencies? >>>>>> >>>>>> The idea of the generated .js files is that it should be possible to >>>>>> be run under various JavaScript shells (browser, node.js, SpiderMonkey, >>>>>> v8), so if you are trying to run it in Rhino and something fails, perhaps >>>>>> you are able to patch up the assumptions and provide a pull request to >>>>>> add >>>>>> support for execution under Rhino? >>>>>> >>>>>> >>>>>> 2014-07-28 17:05 GMT+03:00 <[email protected]>: >>>>>> >>>>>> Seeing a C++ program running under the JVM has been an old wish of >>>>>>> mine. One day I thought I could compile an emscipten-generated .js file >>>>>>> into a .java file using rhino, but alas, the 64k method limit struck. >>>>>>> But... it is also possible to interpret javascript under Rhino, so I've >>>>>>> also tried that, but alas, there are the node.js dependencies. A new >>>>>>> development is the avatar project from java8, which is node.js >>>>>>> compatible - >>>>>>> I haven't tried that yet. Would it be possible to extract the .js from a >>>>>>> generated .html page, slap env.js into the mix and interpret the whole >>>>>>> thing under rhino? Would this be possible and how to do it? >>>>>>> >>>>>>> -- >>>>>>> You received this message because you are subscribed to the Google >>>>>>> Groups "emscripten-discuss" group. >>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>> send an email to [email protected]. >>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>> >>>>>> >>>>>> -- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "emscripten-discuss" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to [email protected]. >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> >>>> -- >>> You received this message because you are subscribed to the Google >>> Groups "emscripten-discuss" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
