feat: add features flag
This commit is contained in:
1 parent
6aa609144d
commit
d20e7ab508
3 files changed
+28
-1
No files matched your search
@@ -55,6 +55,12 @@ pub fn build(config: &CrateConfig) -> Result<()> {
|
||||
cmd.arg(custom_profile);
|
||||
}
|
||||
|
||||
if config.features.is_some() {
|
||||
let features_str = config.features.as_ref().unwrap().join(" ");
|
||||
cmd.arg("--features");
|
||||
cmd.arg(features_str);
|
||||
}
|
||||
|
||||
match executable {
|
||||
ExecutableType::Binary(name) => cmd.arg("--bin").arg(name),
|
||||
ExecutableType::Lib(name) => cmd.arg("--lib").arg(name),
|
||||
@@ -201,6 +207,12 @@ pub fn build_desktop(config: &CrateConfig, is_serve: bool) -> Result<()> {
|
||||
cmd.arg(custom_profile);
|
||||
}
|
||||
|
||||
if config.features.is_some() {
|
||||
let features_str = config.features.as_ref().unwrap().join(" ");
|
||||
cmd.arg("--features");
|
||||
cmd.arg(features_str);
|
||||
}
|
||||
|
||||
match &config.executable {
|
||||
crate::ExecutableType::Binary(name) => cmd.arg("--bin").arg(name),
|
||||
crate::ExecutableType::Lib(name) => cmd.arg("--lib").arg(name),
|
||||
|
||||
Reference in new issue
Block a user