Emscripten without Node.js?

166 views
Skip to first unread message

Anton Smirnov

unread,
Sep 25, 2014, 7:29:04 AM9/25/14
to emscripte...@googlegroups.com
Hi. I've reviewed py files and i can see Node invocations are used even when compiling .html output. Invocations like:

['/softdev/emscripten_portable/node/0.10.18_64bit/bin/node', '/Users/asmirnov/Documents/dev/src/emscripten/src/compiler.js', '/var/folders/64/fwfkm1k51zbd4_c5lwpsbljh0000gn/T/tmpCfQczG.txt', ';', 'glue']

and

['/softdev/emscripten_portable/node/0.10.18_64bit/bin/node', '/Users/asmirnov/Documents/dev/src/emscripten/tools/source-maps/sourcemapper.js', '/var/folders/64/fwfkm1k51zbd4_c5lwpsbljh0000gn/T/tmpuoub24/hw.bc.o.js', '--sourceRoot', '/Users/asmirnov/Documents/dev/src/emscripten', '--mapFileBaseName', '/tmp/hw.html', '--offset', '0']

I've noted Node executable path is passed in "compiler_engine" variable. What are another compiler engines possible?
Can replace/workaround it for a platform which does not have Node.js implementation (ios f.e.)? I mean i'd like to convert .cpp to .js right on ios.

Anton Smirnov

unread,
Sep 25, 2014, 8:06:16 AM9/25/14
to emscripte...@googlegroups.com
I've found Node.js implementation for ios:
https://github.com/node-app

  • console.log()
  • process: .argv, .env, .exit(), .nextTick()
  • require()
  • fs
  • net
  • http
  • timers
  • util
  • url
  • events
  • path
  • stream
  • querystring
  • punycode
  • assert
Is it suitable? I believe IOS has a lot of limitation so will emscripten .js scripts work on ios? With this Node.js impl?

Anton Smirnov

unread,
Sep 25, 2014, 8:07:26 AM9/25/14
to emscripte...@googlegroups.com
BTW. Why isn't LLVM->JS convertion implemented in Python just other files?

Alon Zakai

unread,
Sep 25, 2014, 7:10:47 PM9/25/14
to emscripte...@googlegroups.com
You can change COMPILER_ENGINE in ~/.emscripten. It should work with either node, the spidermonkey shell, or the v8 shell. Not tested on the jsc shell.

We have that part of the compiler in JS for historical reasons, it's older code.

- Alon


On Thu, Sep 25, 2014 at 5:07 AM, Anton Smirnov <d...@antonsmirnov.name> wrote:
BTW. Why isn't LLVM->JS convertion implemented in Python just other files?

--
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 emscripten-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Anton Smirnov

unread,
Sep 26, 2014, 7:49:47 AM9/26/14
to emscripte...@googlegroups.com
Thanks.

Mark Callow

unread,
Sep 30, 2014, 9:55:13 PM9/30/14
to emscripte...@googlegroups.com

On 26/09/2014 08:10, Alon Zakai wrote:
We have that part of the compiler in JS for historical reasons, it's older code.

I thought fastcomp had replaced all the JS. Which part is still in JS?

Regards

    -Mark

--
注意:この電子メールには、株式会社エイチアイの機密情報が含まれている場合が有ります。正式なメール受信者では無い場合はメール複製、 再配信または情報の使用を固く禁じております。エラー、手違いでこのメールを受け取られましたら削除を行い配信者にご連絡をお願いいたし ます.

NOTE: This electronic mail message may contain confidential and privileged information from HI Corporation. If you are not the intended recipient, any disclosure, photocopying, distribution or use of the contents of the received information is prohibited. If you have received this e-mail in error, please notify the sender immediately and permanently delete this message and all related copies.

Alon Zakai

unread,
Sep 30, 2014, 10:49:54 PM9/30/14
to emscripte...@googlegroups.com
emscripten.py will call the JS compiler to emit the JS library code and a little other stuff (like some necessary polyfill code). We've been moving more and more stuff out (e.g. SIMD moved out recently).

- Alon


--
Reply all
Reply to author
Forward
0 new messages