Emurgo / cardano-serialization-lib

This is a library, written in Rust, for serialization & deserialization of data structures used in Cardano's Haskell implementation of Alonzo along with useful utility functions.
Other
231 stars 125 forks source link

Minify ASM package #420

Open mahnunchik opened 2 years ago

mahnunchik commented 2 years ago

It would be helpful to have @emurgo/cardano-serialization-lib-asmjs package be minimized by default.

johnrichardrinehart commented 2 years ago

How did you perform the minimization?

mahnunchik commented 2 years ago

@johnrichardrinehart I perform the minimization by monkey patch: https://github.com/CoinSpace/cs-cardano-wallet/blob/master/webpack.config.js

johnrichardrinehart commented 2 years ago

I was confused because this webpack didn't seem to do anything with your index.js, but I understand, now. webpack is only being used with some Terser/minification webpack modules/pipes to shrink the Cardano serialization library WASM for your import: https://github.com/CoinSpace/cs-cardano-wallet/blob/8e896d9e0422e33cd9a36390f8929f3575ce97eb/index.js#L230-L244 . Totally makes sense.

Thanks a lot! I've starred :smile: .

mahnunchik commented 2 years ago

Yes, it is correct 😉