Skip to content

Commit df3d5b3

Browse files
committed
Make nix optional
- nix dependency is only directly used for i2c in this crate. Signed-off-by: Ayush Singh <[email protected]>
1 parent c9692e1 commit df3d5b3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1010
### Added
1111

1212
- Added async `DelayNs` implementation for `tokio`.
13+
- Added feature flag for `serial`.
1314

1415
## [v0.4.0] - 2024-01-10
1516

Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ edition = "2018"
1616
gpio_sysfs = ["sysfs_gpio"]
1717
gpio_cdev = ["gpio-cdev"]
1818
async-tokio = ["gpio-cdev/async-tokio", "dep:embedded-hal-async", "tokio/time"]
19-
i2c = ["i2cdev"]
19+
i2c = ["i2cdev", "nix"]
2020
spi = ["spidev"]
2121
serial = ["serialport", "embedded-hal-nb"]
2222

@@ -32,7 +32,7 @@ i2cdev = { version = "0.6.0", optional = true }
3232
nb = "1"
3333
serialport = { version = "4.2.0", default-features = false, optional = true }
3434
spidev = { version = "0.6.0", optional = true }
35-
nix = "0.27.1"
35+
nix = { version = "0.27.1", optional = true }
3636
tokio = { version = "1", default-features = false, optional = true }
3737

3838
[dev-dependencies]

0 commit comments

Comments
 (0)