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
Customize cargo profiles #401
Conversation
Before merge this pr, I need to check whether changes in benchmark should be minor. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have the same description for opt-level
and codegen-units
Do we need another profile? Like
Current |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please mention mention in the description the name of the new profile explicitly, and how to use it and the new target folder.
https://github.com/Manta-Network/Manta#build-mantacalamari-node |
Is there a way that we can control the rust version when people use |
Thanks for the suggestion! But actually we has specified msrv in our readme, seems it's not enough. There're three ways to tell people msrv:
I prefer option 1, it's a new feature in rust 2021.
|
* Move rustc flags to cargo profile * Add msrv=1.57 to cargo.toml * Use build subcommand
Description
Rust 1.57 supports to customize cargo profile, so we can move rustc flags(like lto, code-unit) to customized profile.
The opt-level setting controls the [-C opt-level flag](https://doc.rust-lang.org/nightly/rustc/codegen-options/index.html#opt-level) which controls the level of optimization. Higher optimization levels may produce faster runtime code at the expense of longer compiler times. Higher levels may also change and rearrange the compiled code which may make it harder to use with a debugger.
Add a new profile
production
which inherits fromrelease
.How to use this profile:
closes: #295
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
manta
ordolphin
) with right title (start with [Manta] or [Dolphin]),Files changed
in the Github PR explorer.authoring_version
: The version of the authorship interface. An authoring node will not attempt to author blocks unless this is equal to its native runtime.spec_version
: The version of the runtime specification. A full node will not attempt to use its native runtime in substitute for the on-chain Wasm runtime unless all of spec_name, spec_version, and authoring_version are the same between Wasm and native.impl_version
: The version of the implementation of the specification. Nodes are free to ignore this; it serves only as an indication that the code is different; as long as the other two versions are the same then while the actual code may be different, it is nonetheless required to do the same thing. Non-consensus-breaking optimizations are about the only changes that could be made which would result in only the impl_version changing.transaction_version
: The version of the extrinsics interface. This number must be updated in the following circumstances: extrinsic parameters (number, order, or types) have been changed; extrinsics or pallets have been removed; or the pallet order in the construct_runtime! macro or extrinsic order in a pallet has been changed. If this number is updated, then the spec_version must also be updatedversion
for every crate.BaseFilter
. Ensure every extrinsic works from front-end. If there's corresponding tool, ensure both work for each other.