Skip to content

Commit ed352e8

Browse files
authored
Merge pull request #37 from lf-lang/patch-tassilo-lingo-init
`Native` used as default platform
2 parents bbb0b6f + a68079f commit ed352e8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/args.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@ pub struct InitArgs {
8686
#[clap(value_enum, short, long)]
8787
pub language: Option<TargetLanguage>,
8888

89-
#[clap(value_enum, short, long)]
90-
pub platform: Option<Platform>,
89+
#[clap(value_enum, short, long, default_value_t = Platform::Native)]
90+
pub platform: Platform,
9191
}
9292
impl InitArgs {
9393
pub fn get_target_language(&self) -> TargetLanguage {
9494
self.language.unwrap_or({
9595
// Target language for Zephyr is C, else Cpp.
9696
match self.platform {
97-
Some(Platform::Zephyr) => TargetLanguage::C,
97+
Platform::Zephyr => TargetLanguage::C,
9898
_ => TargetLanguage::Cpp,
9999
}
100100
})

src/package/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ impl ConfigFile {
156156
name: Some(spec.name),
157157
main_reactor: Some(spec.path),
158158
target: spec.target,
159-
platform: init_args.platform,
159+
platform: Some(init_args.platform),
160160
dependencies: HashMap::new(),
161161
properties: HashMap::new(),
162162
})

0 commit comments

Comments
 (0)