Skip to content

Commit

Permalink
Include symbol names in the wasm output
Browse files Browse the repository at this point in the history
  • Loading branch information
richvdh committed Dec 4, 2023
1 parent 5ae94b6 commit d6eabbb
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ publish = false
[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docsrs"]

################################################################################
#
# Configuration for `wasm-pack`
#
# See https://rustwasm.github.io/docs/wasm-pack/cargo-toml-configuration.html
# for details of what can be set here.
#
################################################################################

[package.metadata.wasm-pack.profile.profiling]
wasm-opt = false

Expand All @@ -24,7 +33,18 @@ demangle-name-section = true
dwarf-debug-info = true

[package.metadata.wasm-pack.profile.release]
wasm-opt = ['-Oz']
# Tell wasm-opt to:
# * `-Oz`: optimise for size
# * `-g`: include the "name" section (which holds the printable names for
# symbols) in the output.
wasm-opt = ['-Oz', '-g']

################################################################################

[profile.release]
# Tell cargo to run `rustc` with `-C debuginfo=2` - ie, to include debug symbols.
# https://doc.rust-lang.org/cargo/reference/profiles.html#debug
debug = true

[lib]
crate-type = ["cdylib"]
Expand Down

0 comments on commit d6eabbb

Please sign in to comment.