-
Notifications
You must be signed in to change notification settings - Fork 313
Implement the compact imports proposal #2398
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
Implement the compact imports proposal #2398
Conversation
|
I see there are a gazillion CI failures that I don't get locally when running Would appreciate guidance on how to actually run tests here. |
|
For testing For the wit-dylib failure, that's a bad error message about the |
|
I am making good progress on the text parser, I think, but also, I have found myself in an absolute lifetime disaster here. I would really appreciate any guidance on how to resolve the errors I'm seeing. I am completely stumped. Surely I don't have to annotate the entire program with 'a just to be able to iterate over imports in the AST? |
|
As I mentioned on Zulip, I can't seem to use It seems to me like it's correctly parsing the text, but then blowing up when trying to do some kind of...validation run of the binary parser, except with no features enabled? Or maybe something else is wrong, since the compact encoding should trigger an "unexpected externtype" error. |
|
Ok, I think it's all pretty much working, except that there are WIT linking issues that I don't know how to resolve. Would appreciate any guidance on that. I'll leave this in a draft state for a bit while I add spec tests to the proposal repo and use them to validate both this PR and our SpiderMonkey implementation. |
|
Ah those are safe failures to ignore. That's from rustc nightly updates breaking things which I've resolved in #2402 by pinning nightly temporarily |
|
Code-wise everything looks good to me modulo TODO-docs 👍 |
|
No idea what those test failures are...I don't think I changed that file. If you'd like, I can wait to add spec tests for compact imports before merging this? But I'm not sure what you do for proposal spec tests in this repo. |
|
The failures here are related to Rust 1.92 being released, which should be fixed now with a rebase to pick up the changes from #2402. Otherwise it's ok to defer the rigorous tests to the proposal testsuite, but it would be good to have at least a basic test in this repository for some of the textual forms and basic validation -- for example the binary format should be rejected if the feature is not enabled, and then accepted with the feature enabled. |
This implements the Compact Import Section proposal for WebAssembly: https://github.com/WebAssembly/compact-import-section At the time of writing this proposal is stage 2. It adds two new binary / text encodings for the import section that allow for deduplication of module names and externtypes.
8164c28 to
d861b6d
Compare
|
Well, I rebased, I added some tests, they work locally, and now I'm getting newly inscrutable build errors. |
just network errors, I'll retry |
8697e5b
The Compact Import Section proposal adds two new binary and text encodings to the import section that can express imports more concisely.