-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Support passing feature flags to
cargo
invocation (#160)
Adds support for passing feature flags to `cargo`. ## Motivation Smart contract developers will sometimes use [feature flags](https://doc.rust-lang.org/cargo/reference/features.html#the-features-section) 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 ```txt cargo near build --features feat1,feat2 ``` ```txt 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.
- Loading branch information
Showing
4 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters