Skip to content

Commit 5bc3f6b

Browse files
committed
document targetFeatures better
I initially misinterpreted this as a hook to influence the list of features a crate is built with, depending on the target, but this is just the strings passed to `rustc`'s `-C target-feature=`.`
1 parent cf03486 commit 5bc3f6b

File tree

5 files changed

+10
-0
lines changed

5 files changed

+10
-0
lines changed

crate2nix/Cargo.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
, rootFeatures ? [ "default" ]
1515
# If true, throw errors instead of issueing deprecation warnings.
1616
, strictDeprecation ? false
17+
# Elements to add to the `-C target-feature=` argument passed to `rustc`
18+
# (separated by `,`, prefixed with `+`).
1719
# Used for conditional compilation based on CPU feature detection.
1820
, targetFeatures ? []
1921
# Whether to perform release builds: longer compile times, faster binaries.

crate2nix/templates/Cargo.nix.tera

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
, rootFeatures ? [ "default" ]
1717
# If true, throw errors instead of issueing deprecation warnings.
1818
, strictDeprecation ? false
19+
# Elements to add to the `-C target-feature=` argument passed to `rustc`
20+
# (separated by `,`, prefixed with `+`).
1921
# Used for conditional compilation based on CPU feature detection.
2022
, targetFeatures ? []
2123
# Whether to perform release builds: longer compile times, faster binaries.

sample_projects/bin_with_git_submodule_dep/Cargo.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
, rootFeatures ? [ "default" ]
1515
# If true, throw errors instead of issueing deprecation warnings.
1616
, strictDeprecation ? false
17+
# Elements to add to the `-C target-feature=` argument passed to `rustc`
18+
# (separated by `,`, prefixed with `+`).
1719
# Used for conditional compilation based on CPU feature detection.
1820
, targetFeatures ? []
1921
# Whether to perform release builds: longer compile times, faster binaries.

sample_projects/codegen/Cargo.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
, rootFeatures ? [ "default" ]
1515
# If true, throw errors instead of issueing deprecation warnings.
1616
, strictDeprecation ? false
17+
# Elements to add to the `-C target-feature=` argument passed to `rustc`
18+
# (separated by `,`, prefixed with `+`).
1719
# Used for conditional compilation based on CPU feature detection.
1820
, targetFeatures ? []
1921
# Whether to perform release builds: longer compile times, faster binaries.

sample_projects/sub_dir_crates/Cargo.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
, rootFeatures ? [ "default" ]
1515
# If true, throw errors instead of issueing deprecation warnings.
1616
, strictDeprecation ? false
17+
# Elements to add to the `-C target-feature=` argument passed to `rustc`
18+
# (separated by `,`, prefixed with `+`).
1719
# Used for conditional compilation based on CPU feature detection.
1820
, targetFeatures ? []
1921
# Whether to perform release builds: longer compile times, faster binaries.

0 commit comments

Comments
 (0)