Skip to content

Commit 04c5e1f

Browse files
committed
chore:Used NEON BLAKE3 on ARM, kept the x86 build on pure-Rust
1 parent 2367033 commit 04c5e1f

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

Cargo.toml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ test = false
2626
bench = false
2727

2828
[dependencies]
29-
blake3 = { version = "1.8.3", default-features = false, features = ["pure"] }
29+
blake3 = { version = "1.8.3", default-features = false }
3030
spin = "0.5.2"
3131
linked_list_allocator = "0.9.0"
3232

@@ -49,13 +49,19 @@ version = "0.2"
4949
default-features = false
5050

5151
[target.'cfg(target_arch = "x86_64")'.dependencies]
52+
# x86 kernel is soft-float / no-SSE, so BLAKE3 stays pure-Rust here.
53+
blake3 = { version = "1.8.3", default-features = false, features = ["pure"] }
5254
bootloader = { version = "0.9", features = ["map_physical_memory"] }
5355
volatile = "0.2.6"
5456
x86_64 = "0.14.2"
5557
uart_16550 = "0.2.0"
5658
pic8259 = "0.10.1"
5759
pc-keyboard = "0.7.0"
5860

61+
[target.'cfg(target_arch = "aarch64")'.dependencies]
62+
# ARM boot already enables FP/SIMD at EL1 (CPACR_EL1), so NEON is usable.
63+
blake3 = { version = "1.8.3", default-features = false, features = ["neon"] }
64+
5965
[package.metadata.bootimage]
6066
test-args = [
6167
"-device",
@@ -68,4 +74,4 @@ test-args = [
6874
test-success-exit-code = 33
6975

7076
[build-dependencies]
71-
ar = "0.9"
77+
ar = "0.9"

0 commit comments

Comments
 (0)