Skip to content

Current Status of WASM support #9656

Answered by mischnic
ChristophP asked this question in Q&A
Discussion options

You must be logged in to vote

Could wasm be used by simply fetching and loading it with normal WASM APIs?

Yes, this would work:

let wasm = fetch(new URL("./simple.wasm", import.meta.url))
WebAssembly.instantiateStreaming(wasm)

That Wasm file can be treated like any other asset: https://parceljs.org/languages/javascript/#url-dependencies

Is there any support WASM at all currently?

You currently cannot ESM-import Wasm files, that would also be blocked on TLA support in Parcel: #4028
But this shouldn't prevent you from using Wasm

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@ChristophP
Comment options

@mischnic
Comment options

@ChristophP
Comment options

Answer selected by ChristophP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants