You are viewing a single comment's thread from:

RE: Introducing webassembly-loader: Yet another webpack-loader for importing wasm code 😂

in #utopian-io6 years ago

Thank you for your contribution. An awesome write-up, with a lot of learning. I really like your approach of writing test, +1 for that. Though I am not able to understand why have you created webassembly-loader when there are other webpack-loader, might be I am missing something.

I really like "Something that I learn when creating this package" section and I would say that everyone should share the same thing in their post which will benefit not only them but to the reader too.


Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Sort:  

Though I am not able to understand why have you created webassembly-loader when there are other webpack-loader

At first, I also have the same question about webpack 4 which begin to support webassembly file. why they add webassembly/experimental feature when there is wasm-loader?
I begin to understand the reason. Seems they do it for maintainability as well as experimenting some new technique on how to import a module.

Well, the reason I create another loader, as I said in the article:
This way rs-jest (a Jest transformer that I create to make Rust code can be used in Javascript project as a Webassembly module) can be used in a project that either uses Webpack or Rollup.
Summary, compatibility reason.

Another reason is I want to make maintaining "export mode" feature easier. Both in rs-jest and rollup-plugin-rust.

Thank you for your review, @codingdefined!

So far this week you've reviewed 2 contributions. Keep up the good work!

Coin Marketplace

STEEM 0.22
TRX 0.20
JST 0.034
BTC 98787.54
ETH 3368.34
USDT 1.00
SBD 3.08