-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add internal features for the composer
This is the first implementation of the kinds of features atoms will be able to set on themselves. The internal composer function has the ability to define it's own features as well. the semantic for declaring features is basically identical to doing so in a Cargo.toml from Rust, for those famililar: ```toml [features] my_feature = [] my_other_feature = ["my_feature"] default = ["my_feature"] ``` Here, the default feature enabled is `my_feature` because it is in the `default` list. When `my_other_feature` is enabled, it also implicitly enables `my_feature` since it is in it's list.
- Loading branch information
Showing
6 changed files
with
68 additions
and
38 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
[std] | ||
use = true | ||
nixpkgs_lib = false | ||
[features] | ||
std = [] | ||
pkg_lib = ["std"] | ||
default = ["std"] |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,8 @@ | ||
let | ||
inherit (__internal) scope features; | ||
in | ||
{ | ||
Std = std ? set || abort "std missing"; | ||
Lib = std ? lib || abort "lib missing"; | ||
Std = scope ? std; | ||
Lib = scope ? std && scope.std ? lib; | ||
Core = features; | ||
} |