-
Notifications
You must be signed in to change notification settings - Fork 47
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
Support Wasm Release 2.0 except SIMD #41
base: master
Are you sure you want to change the base?
Conversation
As this is a quite low-priority task, closing this. |
Opening again, to boost visibility of this fork (which is great!). Eventually, I want to merge this, once I have a bit more time on my hands. |
I just pushed what I use in Wasm-R3 to this branch. This might be a bit more messier but it's more battle-tested in some sense. If you need a bit more cleaner version of the current fork I am willing to spend a day's evening on this PR, so if you want that to happen just let me know. |
Thanks for updating the PR/branch. Two questions/requests before reviewing it further:
Specifically regarding 2: I might cherry pick some individual files/commits, so that I can piece-wise review this, otherwise it's a bit much (hard to understand, test and land). |
Ah yes at its current state it's a mess. I totally agree. I just pushed what I have to make the most recently maintained fork visible. If you intend to review the changes I will do the work to trim this down to only extending support of wasm release 2.0 |
Since the Wasm 2.0 extensions is probably the largest chunk, let's do that last and land the other things first:
|
Ah glad to hear! I am also delighted to see my work gets upstreamed :). Yeah I also don't wanna do too much work but I kind of want to support SIMD so yeah.. I am a little bit conflicted with these two goals. Maybe I am a little bit too ambitious with this haha. I'll do my best to deliver the best PR possible while minimizing the time spent. Will update! |
I thought a bit, and to me it seems that it's better to go with SIMD affter we merge other changes first. So will proceed as you suggested. |
Agreed. I also wanted to fix a couple small other things here and there, but the more our two branches diverge, the harder the merge will be, so I'll try to do this here first. I have another 1-2 hours this weekend and hopefully a bit more next weekend, so unless it's critical to have SIMD on your end, let's try to land steps 1-3 in the next two weeks 🤞. |
7c77f71
to
d537a83
Compare
The diff is huge.. I'm kinda worried but I have faith in you. I'm in the middle of the huge refactor of Wasm-R3 also. One question: would you be interested if I provide a github actions suite using wasm-r3's to test Wasabi? i.e. When updating Wasabi, check if Wasm-r3's unit tests break. I need them anyway, and I think I am going to use Wasabi at Wasm-R3 for quite long term, so... |
Also, what do you think about switching wasabi/test-inputs/valid-wasm-binaries.txt Line 366 in d537a83
(wasm-validate takes 19.4GB of memory while wasm-tools validate ends so fast so I really can't tell from eye at htop). Also, wabt is generally falling back in maintenance, I also observed that for some valid wasm files, wasm-validate fails to validate. To reproduce:
The only downside might be that, contrary to 1.0.27 version of wasm-validate, which does not error on too many locals, wasm-tools validate errors on it; though I am not sure this is really a downside. If wasabi produces a Wasm binary that exceeds the local count of Wasm-tools, I believe it is better to label it as an error. If you agree about my point, I can change all uses of wasm-validate to wasm-tools validate, at this PR or at another PR. |
I think this PR lacks the required changes to the runtime.js to support new Wasabi instrumentation, though I am not sure what would be the appropriate one yet. Will try to figure out and update, if you think it's more appropriate to turn this PR into a draft, then do so. |
I pushed what I have here: 6ba2665 but it is not thoroughly tested yet. If I have more confidence I will update. Sorry for the force push.
I needed them anyway so I did the work and pushed to here: https://github.com/doehyunbaek/wasabi/tree/master I confirmed One oddity to point out is this line: doehyunbaek@83f0102#diff-b9dd56b27786e1119956ce0436abcab055141601a9d4ce33f66451b8ffb1bbd2R175 I had to revert the monkey patch, because without it running I will progress on top of this commit and if there's anything to say let me know. |
I have confirmed the test passing for all the tests in the valid-wasm-binaries.txt.