Skip to content

Remove WASM2C option - #19380

Merged
kripken merged 2 commits into
mainfrom
no.wasm2c
May 17, 2023
Merged

Remove WASM2C option#19380
kripken merged 2 commits into
mainfrom
no.wasm2c

Conversation

@kripken

@kripken kripken commented May 16, 2023

Copy link
Copy Markdown
Member

This was very useful for me personally in exploring the options in the wasm2c
space, and in benchmarking in particular, for:

https://kripken.github.io/blog/wasm/2020/07/27/wasmboxc.html

At this time, however, all known users of wasm2c are using upstream wasm2c
from wabt directly. And the benefits of emscripten's integration are diminishing
as features like wasm-EH remove the need for emscripten-EH (which wasm2c
supported here). So we might as well remove this option to get rid of the
complexity, since this is already quite behind upstream wasm2c, and the work
to update it is not trival, and not worth it given the lack of users.

@kripken
kripken requested a review from sbc100 May 16, 2023 23:41
@kripken
kripken merged commit 400a1f6 into main May 17, 2023
@kripken
kripken deleted the no.wasm2c branch May 17, 2023 16:05
@turbolent

Copy link
Copy Markdown

It looks like this PR removed a (partial) wasm2c implementation of the Emscripten ABI, is that correct? Is this available elsewhere?

@kripken

kripken commented Oct 21, 2024

Copy link
Copy Markdown
Member Author

@turbolent I'm not aware of implementations elsewhere. Do you have a use case for it, I'm curious?

@turbolent

Copy link
Copy Markdown

@kripken Though there is quite some software ported to WebAssembly and WASI, it seems like there is even more software ported to Emscripten. Though Emscripten has a primary focus on allowing software to get ported to the Web/browser, it could also be really useful for porting software in general. So I'm looking into adding support for Emscripten to https://github.com/turbolent/w2c2, which is very similar to wasm2c

@turbolent

Copy link
Copy Markdown

Ideally Emscripten would mostly use WASI where possible, see PR / comment #18285 (comment)

@kripken

kripken commented Oct 22, 2024

Copy link
Copy Markdown
Member Author

I see, thanks @turbolent . Yeah, adding more WASI support in Emscripten makes sense, and we've tried to do that as much as we can, but WASI APIs are not complete/compatible enough for all the things needed on the Web, so there is some unavoidable fragmentation here, unfortunately.

In a perfect world server VMs would support Web APIs or Web VMs would support WASI, but there seems little interest on either side, and valid reasons for them not to, at this point in time.

Note that Emscripten does have standalone mode (-sSTANDALONE) which increases WASI compatibility. It won't work in all (or most) Emscripten projects, but the ones it fails on may just have corresponding JS code (EM_ASM, etc.), which I assume you don't expect to support anyhow?

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

Successfully merging this pull request may close these issues.

3 participants