Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimising wasm build size, shaves about 10% size off our wasm output. #186

Merged
merged 1 commit into from
Apr 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[profile.release]
panic = "abort"
opt-level = "s"

[workspace]

Expand Down
12 changes: 0 additions & 12 deletions nym-sphinx-wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,3 @@ wee_alloc = { version = "0.4.2", optional = true }

[dev-dependencies]
wasm-bindgen-test = "0.2"

# This gets ignored right now, and there is a compiler warning generated:
# "warning: profiles for the non root package will be ignored, specify profiles
# at the workspace root"
#
# I'm OK with that for the moment, I don't want to put it in the root Cargo file
# as I'm unclear what effect it'll have and I'm still experimenting with wasm.
# But it's good that we are reminded to do something about it before any
# production release.
[profile.release]
# Tell `rustc` to optimize for small code size.
opt-level = "s"