Skip to content

Commit

Permalink
Update wasm example
Browse files Browse the repository at this point in the history
Removed wasm-pack config now that issue is fixed:
rustwasm/wasm-pack#886
  • Loading branch information
sharksforarms committed Apr 6, 2021
1 parent af2adf4 commit 4819e26
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions ensure_wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ crate-type = ["cdylib", "rlib"]
default = ["console_error_panic_hook", "wee_alloc"]

[dependencies]
wasm-bindgen = "=0.2.68"
wasm-bindgen = "0.2.73"

# The `console_error_panic_hook` crate provides better debugging of panics by
# logging them with `console.error`. This is great for development, but requires
# all the `std::fmt` and `std::panicking` infrastructure, so isn't great for
# code size when deploying.
console_error_panic_hook = { version = "0.1.1", optional = true }
console_error_panic_hook = { version = "0.1", optional = true }

# `wee_alloc` is a tiny allocator for wasm that is only ~1K in code size
# compared to the default allocator's ~10K. It is slower than the default
# allocator, however.
#
# Unfortunately, `wee_alloc` requires nightly Rust when targeting wasm for now.
wee_alloc = { version = "0.4.2", optional = true }
wee_alloc = { version = "0.4", optional = true }

deku = { path = "../" }
hex = "0.4"
Expand All @@ -37,7 +37,3 @@ wasm-bindgen-test = "0.3"
[profile.release]
# Tell `rustc` to optimize for small code size.
opt-level = "s"

# https://github.com/rustwasm/wasm-pack/issues/886#issuecomment-667669802
[package.metadata.wasm-pack.profile.release]
wasm-opt = ["-Oz", "--enable-mutable-globals"]

0 comments on commit 4819e26

Please sign in to comment.