Check out nbind <https://github.com/charto/nbind#readme>, a new version was 
just released making usage in browsers easier. Also, you'll get to compile 
the Node.js version to native binary (OS X, Linux and Windows), in addition 
to an Emscripten-based asm.js fallback for web browsers and people without 
working native C++ compilers.

The included toolchain handles all issues with .mem files in both Node.js 
and browsers. Feel free to ask or file an issue on Github if you have any 
problems. If for some reason you don't want to use nbind for bindings, 
you'll probably still find many parts of the toolchain useful for targeting 
both browsers and Node.js.

Best regards,
-Juha

perjantai 29. heinäkuuta 2016 14.06.04 UTC+3 awt kirjoitti:
>
> Hi,
>
> Does anybody have any comments on this issue? Any suggestions would be 
> most welcome. Thanks.
>
> On Thursday, July 28, 2016 at 11:28:06 PM UTC+8, awt wrote:
>>
>> Hi,
>>
>> I have a project that comes with the mem file as well as some fonts that 
>> I preload for browser usage. I would like to package this project for 
>> node.js as well. As node doesn't support the preload setting, I have 
>> decided to deploy my fonts thru npm.
>>
>> I tried to use npm install to release my project but when I do a require 
>> in my test file:
>>
>> var testApp = require('EmscriptenApp');
>>
>> I observe that EmscriptenApp.js tries to load EmscriptenApp.mem from the 
>> current directory which is where my test file is and not in the 
>> node_modules sub folder where EmscriptenApp.mem is residing. I could turn 
>> off the memory file option but would prefer not to so that I can get a 
>> better performance on the browser.
>>
>> The other point is that my fonts are also npm installed into subfolders 
>> in node_modules so how should I mount my FS root directory in 
>> EmscriptenApp.js to access them?
>>
>> Or perhaps, is there a better approach to this issue? 
>>
>

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

Reply via email to