Repository navigation
features.json: Add w2c2 runtime - #580
Conversation
tomayac
left a comment
There was a problem hiding this comment.
Just missing a logo, but otherwise looks good. Please check if the quite detailed logo (w2c2.svg) works in this context.
tomayac
left a comment
There was a problem hiding this comment.
LGTM, thank you
(Drive-by comment: Maybe a good opportunity to simplify the logo and just make it the Wasm logo in front of the four direction arrows, so it looks less like a book.)
|
Yeah, I'll add a smaller logo upstream and open another PR here soon.
It's supposed to be a software box, inspired by e.g. these https://www.reddit.com/r/VintageApple/comments/k4yji8/apple_software_box_gallery_mid1990s_love_the/ |
|
w2c2 is a great piece of software, but should we distinguish somewhere between the Wasm runtimes that implement the language semantics vs. ones (like w2c2 but not only w2c2) that diverge from it for performance or other reasons? E.g. my understanding had been that w2c2 doesn't have deterministic traps on memory OOB (e.g. when compiled through an optimizing C compiler), and by default (but can be turned on by the user) skips various runtime traps (e.g. memory load/store OOB, call_indirect type mismatch).I should be clear that (per Shravan Narayan's talk at the last CG meeting research day) it sounds like several engines (not just w2c2) have some of these properties. |
|
I don't know if this is the right place to discuss it, but I want to at least correct this false statement:
Deterministic memory-OOB traps are supported, but disabled by default, like other run-time traps. The "default use-case" for w2c2 is translating modules that are assumed to behave correctly and not exercise such run-time traps. It can support modules that do exercise run-time traps and add run-time checks, it's just not the default. I don't see why it would be useful to distinguish that, but feel free to do so. I just hope it is not shown with a negative indicator. |
Hmm, I don't think so -- are you running the testsuite with the same optimizer flags you use for performance measurements (and do the tests pass)? I'm looking at the generated output and there doesn't seem to be anything protecting the W2C2_MEMCPY from being optimized out by the C compiler (if the rest of the function is invariant to the result). See https://youtu.be/meSkbrFFbe8 for a broader discussion of this. |
|
I should probably say, I've worked on wasm2c in the past and this has been a vexing and annoying issue, so I hope my comments are received in the spirit intended -- w2c2 is great. |
|
@keithw Again, I don't think this PR is the right place to have a discussion about that. If you have constructive feedback for w2c2, I'd appreciate an issue: https://github.com/turbolent/w2c2/issues/new
I'm not getting a positive/constructive one if that's what you intended: Jumping in to ask if flaws can be pointed out in an overview isn't. Especially also after you've previously made dismissive comments like at WebAssembly/wabt#2289 (comment) |
|
Hey, I'm sorry to hear that. For a PR to list w2c2 among the WebAssembly engines, it seemed reasonable and in-scope to ask if w2c2 is really implementing WebAssembly. I had understood w2c2's intent to be otherwise (e.g. diverging from the strict semantics, and in particular the deterministic traps, to gain performance) and didn't mean my comments to be dismissive. If you are really trying to implement the full WebAssembly semantics, I think w2c2's test runner will need to start doing something for (module
(memory 0)
(func (export "f") (drop (i32.load (i32.const 0))))
)
(assert_trap (invoke "f") "out of bounds memory access")If you want issues for this, I can make them if you really want. |
Maybe check/ask before assuming? Through this PR I was also trying to show that w2c2 is spec compliant.
Do you ever check your accusations before you post them? I ran your exact example with |
|
Please sleep over it, reconsider if the argument is still worth it, and if so continue the discussion over in https://github.com/turbolent/w2c2/issues/new. Thanks for the PR. |
No description provided.