Skip to content

Commit

Permalink
default to native, with the ability to opt back into the pio build dr…
Browse files Browse the repository at this point in the history
…iver
  • Loading branch information
MabezDev authored and ivmarkov committed Mar 21, 2022
1 parent b9c83ab commit 573bcc6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ build = "build/build.rs"
documentation = "https://esp-rs.github.io/esp-idf-sys/"

[features]
default = ["std", "pio"]
default = ["std", "native"]

std = []
alloc_handler = []
Expand Down
10 changes: 5 additions & 5 deletions build/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ use embuild::{bindgen, build, cargo, kconfig, path_buf};

mod common;

// Note that the feature `native` must come before `pio`. These features are really
// Note that the feature `pio` must come before `native`. These features are really
// mutually exclusive but that would require that all dependencies specify the same
// feature so instead we prefer the `native` feature over `pio` so that if one package
// specifies it, this overrides the `pio` feature for all other dependencies too.
// feature so instead we prefer the `pio` feature over `native` so that if one package
// specifies it, this overrides the `native` feature for all other dependencies too.
// See https://doc.rust-lang.org/cargo/reference/features.html#mutually-exclusive-features.
#[cfg(any(feature = "pio", feature = "native"))]
#[cfg_attr(feature = "native", path = "native.rs")]
#[cfg_attr(all(feature = "pio", not(feature = "native")), path = "pio.rs")]
#[cfg_attr(feature = "pio", path = "pio.rs")]
#[cfg_attr(all(feature = "native", not(feature = "pio")), path = "native.rs")]
mod build_driver;

#[derive(Debug)]
Expand Down

0 comments on commit 573bcc6

Please sign in to comment.