Skip to content

Commit f786ba6

Browse files
committed
Cargo.toml: Fix excessive dependency requirements
1 parent 8c0f6b4 commit f786ba6

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

Cargo.toml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ aligned = "0.3"
1414
embedded-hal = "0.2"
1515
stm32f4xx-hal = { version = "0.8" , optional = true }
1616
smoltcp = { version = "0.6.0", default-features = false, features = ["proto-ipv4", "proto-ipv6", "socket-icmp", "socket-udp", "socket-tcp", "log", "verbose", "ethernet"], optional = true }
17-
log = "0.4"
18-
cortex-m-rtic = "0.5.3"
17+
log = { version = "0.4", optional = true }
18+
cortex-m-rtic = { version = "0.5.3", optional = true }
1919

2020
[features]
2121
smoltcp-phy = ["smoltcp"]
@@ -25,6 +25,8 @@ smoltcp-phy-all = [
2525
]
2626
stm32f4 = ["stm32f4xx-hal"]
2727
stm32f407 = ["stm32f4xx-hal/stm32f407"]
28+
tx_stm32f407 = ["stm32f407", "log", "cortex-m-rtic"]
29+
tcp_stm32f407 = ["stm32f407", "smoltcp-phy-all", "smoltcp/log", "log", "cortex-m-rtic"]
2830
default = []
2931

3032
[dev-dependencies]
@@ -34,11 +36,11 @@ panic-itm = "0.4"
3436

3537
[[example]]
3638
name = "tx_stm32f407"
37-
required-features = ["stm32f407"]
39+
required-features = ["tx_stm32f407"]
3840

3941
[[example]]
4042
name = "tcp_stm32f407"
41-
required-features = ["stm32f407", "smoltcp-phy-all", "smoltcp/log"]
43+
required-features = ["tcp_stm32f407"]
4244

4345
[profile.release]
4446
codegen-units = 1

shell.nix

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ let
9494

9595
# Examples
9696
exTxStm32f407 = writeShellScriptBin "tx_stm32f407" ''
97-
cargo run --release --example=tx_stm32f407 --features=stm32f407
97+
cargo run --release --example=tx_stm32f407 --features=tx_stm32f407
9898
'';
9999
exTcpStm32f407 = writeShellScriptBin "tcp_stm32f407" ''
100-
cargo run --release --example=tcp_stm32f407 --features=stm32f407,smoltcp-phy-all
100+
cargo run --release --example=tcp_stm32f407 --features=tcp_stm32f407
101101
'';
102102
in
103103
stdenv.mkDerivation {

0 commit comments

Comments
 (0)