Skip to content

Commit fb2db21

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 fb2db21

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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)