forcing usage of MEMFS on Node

2017-05-09 Thread Giovanni Parra
The program I'm working on (actually I'm just compiling jq, which is written by other people) doesn't need any persistence or file-reading, thus I'm perfectly satisfied with using only MEMFS. It works fine in the browser, both with and without Browserify, but

What does it mean when the stdout function is being passed negative numbers?

2017-05-09 Thread Giovanni Parra
I mean the stdout function configurable at FS.init: https://kripken.github.io/emscripten-site/docs/api_reference/Filesystem-API.html#setting-up-standard-i-o-devices Most times I can handle the values passed to that function by calling String.fromCharCode(c) on them, so I get the corresponding J

Re: forcing usage of MEMFS on Node

2017-05-15 Thread Giovanni Parra
I ended up solving my particular issue with this commit: https://github.com/fiatjaf/jq-web/commit/51049256be1f69dcf3faa25a809bf91a8fb3a6e2 The error, I imagine but am not certain, was being caused by my browserify-transpilation step, I imagine that browserify messes up with the `process` globa

Re: What does it mean when the stdout function is being passed negative numbers?

2017-05-19 Thread Giovanni Parra
Ok, as soon as I noted that my problem was in my stdin/stdout functions I've searched the entire internet for a solution, a perhaps "default" implementation of those in Javascript, but couldn't find none, neither here nor in StackOverflow or in the tests of the Emscripten repository (although I

Re: Assertion failed: cannot call main when async dependencies remain! (listen on __ATMAIN__)

2018-02-14 Thread Giovanni Parra
How can I know if it is ok to call main? Is there something my JS code can listen to that will notify me that I can call main? Or should I just call main repeatedly until it works? On Wednesday, July 30, 2014 at 7:03:44 PM UTC-3, Alon Zakai wrote: > > You should only call main() when things are r