Skip to content

is it possible to build emscripten itself to WASM? #14229

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
leoleoasd opened this issue May 19, 2021 · 5 comments
Closed

is it possible to build emscripten itself to WASM? #14229

leoleoasd opened this issue May 19, 2021 · 5 comments

Comments

@leoleoasd
Copy link

is it possible to build emscripten (like emcc / em++) itself to WASM?
I'm trying to make an "Online IDE" that can compile c/c++ into wasm and run it in the browser.

@leoleoasd
Copy link
Author

leoleoasd commented May 19, 2021

I've noticed that emcc is written in python. is it possible to run emcc using something like https://github.com/dgym/cpython-emscripten ?

@RReverser
Copy link
Collaborator

RReverser commented May 19, 2021

Everything is possible with enough effort and investment :) But I don't think this is something Emscripten team would do itself.

Meanwhile, you might want to check out https://github.com/binji/wasm-clang and the demo at https://binji.github.io/wasm-clang which has at least Clang ported to Wasm and compiling other inputs to Wasm from within Wasm.

@leoleoasd
Copy link
Author

leoleoasd commented May 19, 2021

Everything is possible with enough effort and investment :) But I don't think this is something Emscripten team would do itself.

Meanwhile, you might want to check out https://github.com/binji/wasm-clang and the demo at https://binji.github.io/wasm-clang which has at least Clang ported to Wasm and compiling other inputs to Wasm from within Wasm.

Yes, I've tried that, and I implemented its stdin support.(binji/wasm-clang#6) But it can't support interactive input.
Opening this issue is only a discussion of the possibilities. I'm not expecting Emscripten team would do it.

@kripken
Copy link
Member

kripken commented May 19, 2021

I think this is a duplicate of #6432

@kripken
Copy link
Member

kripken commented May 19, 2021

(In general, I think this would be interesting, and if someone has the time to do it I'm be interested to see the results! But as @RReverser said, this isn't something anyone is currently working on AFAIK)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants