Add default `[profile.release]` values to Cargo.toml if not present
Created by: ascjones
As a follow up to #33, which enables amending the Cargo.toml
, we could add the following section if it is not present:
[profile.release]
panic = "abort"
lto = true
opt-level = "z"
overflow-checks = true
These are the default optimal settings for contract binary size. However if any of these settings are already defined in the Cargo.toml, then those values should be used instead of these defaults. Potentially the user could be warned if using a non-optimal setting.