-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
BREAKING: Remove support for .wasm imports #5135
Conversation
Importing .wasm files is non-standardized therefore deciding to support current functionality past 1.0 release is risky. Besides that .wasm import posed many challenges in our codebase due to complex interactions with TS compiler which spawned thread for each encountered .wasm import. This commit removes: - cli/compilers/wasm.rs - cli/compilers/wasm_wrap.js - two integration tests related to .wasm imports
Couldn't it be --unstable, wasm support is a huge win. |
@hayd WASM is still supported, this PR only removes You can still use const bytes = new Uint8Array([
0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x07, 0x01, 0x60,
0x02, 0x7f, 0x7f, 0x01, 0x7f, 0x03, 0x02, 0x01, 0x00, 0x07, 0x07, 0x01,
0x03, 0x61, 0x64, 0x64, 0x00, 0x00, 0x0a, 0x09, 0x01, 0x07, 0x00, 0x20,
0x00, 0x20, 0x01, 0x6a, 0x0b
]);
async function main() {
const wasm = await WebAssembly.instantiate(bytes);
const result = wasm.instance.exports.add(1, 3);
console.log("1 + 3 =", result);
if (result != 4) {
throw Error("bad");
}
}
main(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a reference to wasm imports in docs/getting_started/wasm.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Sad to see it go, but I guess we can bring it back some time in the future once we figure out what could be the best solution. |
@kevinkassimo that's the idea. I'm also sad to see this go, but it's hindering refactors in the compiler and a case can be made that wasm imports are not standard. I think we'll have this feature back relatively soon. |
😢 Really so sad to see this super wanted feature get out from 🦕 travels stories. |
Importing .wasm files is non-standardized therefore deciding to
support current functionality past 1.0 release is risky.
Besides that .wasm import posed many challenges in our codebase
due to complex interactions with TS compiler which spawned
thread for each encountered .wasm import.
This commit removes: