Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

wasm-gc depricated, and should not be needed? #5681

Closed
nuke-web3 opened this issue Jun 15, 2022 · 3 comments
Closed

wasm-gc depricated, and should not be needed? #5681

nuke-web3 opened this issue Jun 15, 2022 · 3 comments

Comments

@nuke-web3
Copy link
Contributor

nuke-web3 commented Jun 15, 2022

# Install wasm-gc. It's useful for stripping slimming down wasm binaries.

Note: you probably don't need to use this project. This project is no
longer necessary to run by hand, nor do you need the wasm-gc executable
installed.

  1. The Rust compiler now natively supports --gc-sections when linking wasm executables, which means wasm executables already have 90% of their garbage removed when coming out of the compiler.
  2. The wasm-pack (and wasm-bindgen) project will already run this by default for you, so there's no need to run it again.

Don't include this build! If you think you need to feel free to open an issue on wasm-pack or wasm-bindgen, as it may be a bug in one of those projects!

I wonder if the script needs this still? It is also unmaintained, and my gut says that is a reason not to use it.

I also noticed: https://blog.rust-lang.org/2022/02/24/Rust-1.59.0.html#creating-stripped-binaries

[profile.release]
strip = "debuginfo"

This causes debuginfo to be stripped from release binaries. You can also supply "symbols" or just true to strip all symbol information where supported.

Without context, I wonder if this is related and could obviate some need for cargo-gc

@bkchr
Copy link
Member

bkchr commented Jun 15, 2022

Wasm-gc isn't required to be installed. It can be removed from the script.

@pepyakin
Copy link
Contributor

pepyakin commented Jun 16, 2022

Duplicate of paritytech/substrate#1262

@pepyakin pepyakin closed this as not planned Won't fix, can't repro, duplicate, stale Jun 16, 2022
@pepyakin pepyakin marked this as a duplicate of paritytech/substrate#1262 Jun 16, 2022
@bkchr
Copy link
Member

bkchr commented Jun 16, 2022

This is not really a duplicate. It is about cleaning the init.sh script. Not sure if someone is still using this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants