Closed oysterpack closed 3 years ago
Even though I have the following release options set:
[profile.release] codegen-units = 1 opt-level = "z" lto = true debug = 0 panic = "abort" overflow-checks = true [profile.release.package."*"] codegen-units = 1 opt-level = "z" debug = 0 overflow-checks = true
debug symbols were still being included, which can be seen via the twiggy tool. The wasm fil size was over 1.4 MB.
twiggy
The short term work around was to use a rust nightly feature to strip out symbols which shrank the file size down to 92.8 KB
Temporary solution to make it work with rust stable is to use the following rustc flags within /near/.cargo/config.toml :
[build] rustflags = ["-C", "link-args=-s"]
Even though I have the following release options set:
debug symbols were still being included, which can be seen via the
twiggy
tool. The wasm fil size was over 1.4 MB.The short term work around was to use a rust nightly feature to strip out symbols which shrank the file size down to 92.8 KB
NOTES