Skip to content

Commit c89df35

Browse files
committed
Move Device and time to new crate
1 parent 8203207 commit c89df35

File tree

8 files changed

+402
-289
lines changed

8 files changed

+402
-289
lines changed

Cargo.toml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
[workspace]
2+
members = ["smoltcp-device"]
3+
14
[package]
25
name = "smoltcp"
36
version = "0.12.0"
@@ -28,6 +31,7 @@ bitflags = { version = "1.0", default-features = false }
2831
defmt = { version = "0.3.8", optional = true, features = ["ip_in_core"] }
2932
cfg-if = "1.0.0"
3033
heapless = "0.8"
34+
smoltcp-device = { version = "0.1.0", path = "smoltcp-device" }
3135

3236
[dev-dependencies]
3337
env_logger = "0.10"
@@ -40,21 +44,21 @@ rand_chacha = "0.3.1"
4044
idna = { version = "=1.0.1" }
4145

4246
[features]
43-
std = ["managed/std", "alloc"]
47+
std = ["managed/std", "alloc", "smoltcp-device/std"]
4448
alloc = ["managed/alloc", "defmt?/alloc"]
4549
verbose = []
46-
defmt = ["dep:defmt", "heapless/defmt-03"]
47-
"medium-ethernet" = ["socket"]
48-
"medium-ip" = ["socket"]
49-
"medium-ieee802154" = ["socket", "proto-sixlowpan"]
50+
defmt = ["dep:defmt", "heapless/defmt-03", "smoltcp-device/defmt"]
51+
"medium-ethernet" = ["socket", "smoltcp-device/medium-ethernet"]
52+
"medium-ip" = ["socket", "smoltcp-device/medium-ip"]
53+
"medium-ieee802154" = ["socket", "proto-sixlowpan", "smoltcp-device/medium-ieee802154"]
5054

5155
"phy-raw_socket" = ["std", "libc"]
5256
"phy-tuntap_interface" = ["std", "libc", "medium-ethernet"]
5357

54-
"proto-ipv4" = []
58+
"proto-ipv4" = ["smoltcp-device/proto-ipv4"]
5559
"proto-ipv4-fragmentation" = ["proto-ipv4", "_proto-fragmentation"]
5660
"proto-dhcpv4" = ["proto-ipv4"]
57-
"proto-ipv6" = []
61+
"proto-ipv6" = ["smoltcp-device/proto-ipv6"]
5862
"proto-ipv6-hbh" = ["proto-ipv6"]
5963
"proto-ipv6-fragmentation" = ["proto-ipv6", "_proto-fragmentation"]
6064
"proto-ipv6-routing" = ["proto-ipv6"]
@@ -93,7 +97,7 @@ defmt = ["dep:defmt", "heapless/defmt-03"]
9397
# Enable Reno TCP congestion control algorithm, and it is used as a default congestion controller.
9498
"socket-tcp-reno" = []
9599

96-
"packetmeta-id" = []
100+
"packetmeta-id" = ["smoltcp-device/packetmeta-id"]
97101

98102
"async" = []
99103

smoltcp-device/Cargo.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[package]
2+
name = "smoltcp-device"
3+
version = "0.1.0"
4+
edition = "2021"
5+
rust-version = "1.81"
6+
7+
[dependencies]
8+
defmt = { version = "0.3.8", optional = true, features = ["ip_in_core"] }
9+
10+
[features]
11+
defmt = ["dep:defmt"]
12+
13+
std = []
14+
15+
"proto-ipv4" = []
16+
"proto-ipv6" = []
17+
18+
"medium-ethernet" = []
19+
"medium-ip" = []
20+
"medium-ieee802154" = []
21+
22+
"packetmeta-id" = []

0 commit comments

Comments
 (0)