Smart contract developers will sometimes use feature flags to enable/disable certain portions of code during compilation (e.g. enable certain debugging features for the testnet version which are not available in the production version).
Usage
cargo near build --features feat1,feat2
cargo near build --no-default-features
Implementation Notes
It does no validation of the input received to the flag, transparently forwarding it as an opaque string directly to cargo, after appending near-sdk/__abi-embed if necessary.
Adds support for passing feature flags to
cargo
.Motivation
Smart contract developers will sometimes use feature flags to enable/disable certain portions of code during compilation (e.g. enable certain debugging features for the testnet version which are not available in the production version).
Usage
Implementation Notes
It does no validation of the input received to the flag, transparently forwarding it as an opaque string directly to
cargo
, after appendingnear-sdk/__abi-embed
if necessary.