Add preferred default release profile settings

Sergej Kostjucenko requested to merge aj-profile-release into master

Created by: ascjones

Rel #40, https://github.com/paritytech/ink/pull/448

If any of the following [profile.release] settings are missing, then they are added with the following preferred defaults:

[profile.release]
panic = "abort"
lto = true
opt-level = "z"
overflow-checks = true
codegen-units = 1

Any of the above that are manually specified are not overwritten. This allows manual control over e.g. opt-level where in some cases opt-level = 3 might result in a smaller binary size.

Template changes:

  • Remove [profile.release] section
  • Use scale-info from crates.io instead of type-metadata (reverted: requires ink! 3 release)

Merge request reports