Skip to content

Commit 1789c51

Browse files
committed
style: format Cargo files
1 parent ee1fa11 commit 1789c51

4 files changed

Lines changed: 41 additions & 25 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,14 @@ jobs:
6969
name: Format
7070
runs-on: ubuntu-latest
7171
steps:
72+
- uses: dtolnay/rust-toolchain@stable
73+
- run: cargo install cargo-cargofmt
7274
- uses: actions/checkout@v6
7375
- uses: mkroening/rust-toolchain-toml@main
7476
- run: rustup component add rustfmt
7577
- run: |
76-
cargo fmt --all --check
77-
cargo fmt --all --check --manifest-path hermit-builtins/Cargo.toml
78+
cargo cargofmt --all --check
79+
cargo cargofmt --all --check --manifest-path hermit-builtins/Cargo.toml
7880
7981
lock-file:
8082
name: Lock file

Cargo.toml

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,28 @@ name = "measure_startup_time"
3434
harness = false
3535

3636
[features]
37-
default = ["kernel-stack", "pci", "pci-ids", "acpi", "fsgsbase", "smp", "tcp", "dhcpv4", "virtio-fs", "virtio-net", "virtio-vsock"]
37+
default = [
38+
"kernel-stack",
39+
"pci",
40+
"pci-ids",
41+
"acpi",
42+
"fsgsbase",
43+
"smp",
44+
"tcp",
45+
"dhcpv4",
46+
"virtio-fs",
47+
"virtio-net",
48+
"virtio-vsock",
49+
]
3850
acpi = []
3951
alloc-stats = ["talc/counters"]
4052
common-os = []
41-
dhcpv4 = ["net", "smoltcp", "smoltcp/proto-dhcpv4", "smoltcp/socket-dhcpv4"]
53+
dhcpv4 = [
54+
"net",
55+
"smoltcp",
56+
"smoltcp/proto-dhcpv4",
57+
"smoltcp/socket-dhcpv4",
58+
]
4259
dns = ["net", "smoltcp", "smoltcp/socket-dns"]
4360
fsgsbase = []
4461
gem-net = ["net", "dep:tock-registers"]
@@ -75,7 +92,7 @@ vsock = ["virtio-vsock"]
7592

7693
[lints.rust]
7794
rust_2018_idioms = "warn"
78-
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(careful)'] }
95+
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(careful)"] }
7996
unsafe_op_in_unsafe_fn = "warn"
8097

8198
[lints.clippy]
@@ -153,14 +170,9 @@ features = [
153170
"async",
154171
"medium-ethernet",
155172
"proto-ipv4",
156-
"proto-ipv6",
157-
# Enable IP fragmentation
173+
"proto-ipv6", # Enable IP fragmentation
158174
"proto-ipv4-fragmentation",
159-
"proto-ipv6-fragmentation",
160-
#
161-
# Assume a MTU size of 9000
162-
#"fragmentation-buffer-size-8192",
163-
#"reassembly-buffer-size-8192",
175+
"proto-ipv6-fragmentation",## Assume a MTU size of 9000#"fragmentation-buffer-size-8192",#"reassembly-buffer-size-8192",
164176
]
165177

166178
[target.'cfg(target_arch = "x86_64")'.dependencies]
@@ -169,8 +181,8 @@ raw-cpuid = "11"
169181
uart_16550 = "0.4"
170182
x86_64 = "0.15"
171183
memory_addresses = { version = "0.3", default-features = false, features = [
172-
"x86_64",
173-
"conv-x86_64",
184+
"x86_64",
185+
"conv-x86_64",
174186
] }
175187

176188
[target.'cfg(target_arch = "aarch64")'.dependencies]
@@ -179,7 +191,7 @@ arm-gic = { version = "0.6" }
179191
arm-pl011-uart = { version = "0.4", default-features = false }
180192
semihosting = { version = "0.1", optional = true }
181193
memory_addresses = { version = "0.3", default-features = false, features = [
182-
"aarch64",
194+
"aarch64",
183195
] }
184196

185197
[target.'cfg(target_arch = "riscv64")'.dependencies]
@@ -189,7 +201,7 @@ semihosting = { version = "0.1", optional = true }
189201
tock-registers = { version = "0.10", optional = true }
190202
trapframe = "0.10"
191203
memory_addresses = { version = "0.3", default-features = false, features = [
192-
"riscv64",
204+
"riscv64",
193205
] }
194206

195207
[dev-dependencies]
@@ -202,13 +214,8 @@ built = { version = "0.8", features = ["git2", "chrono"] }
202214
llvm-tools = "0.1"
203215

204216
[workspace]
205-
members = [
206-
"hermit-macro",
207-
"xtask",
208-
]
209-
exclude = [
210-
"hermit-builtins",
211-
]
217+
members = ["hermit-macro", "xtask"]
218+
exclude = ["hermit-builtins"]
212219

213220
[patch.crates-io]
214221
safe-mmio = { git = "https://github.com/hermit-os/safe-mmio", branch = "be" }

hermit-macro/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
[package]
22
name = "hermit-macro"
33
version = "0.1.0"
4-
authors = ["Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>"]
4+
authors = [
5+
"Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>",
6+
]
57
edition = "2024"
68
description = "Proc macro implementation to defined system calls"
79
repository = "https://github.com/hermit-os/kernel"

xtask/Cargo.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ edition = "2024"
55

66
[features]
77
default = ["ci"]
8-
ci = ["dep:ovmf-prebuilt", "dep:sysinfo", "dep:ureq", "dep:wait-timeout"]
8+
ci = [
9+
"dep:ovmf-prebuilt",
10+
"dep:sysinfo",
11+
"dep:ureq",
12+
"dep:wait-timeout",
13+
]
914

1015
[dependencies]
1116
anyhow = "1.0"

0 commit comments

Comments
 (0)