From 9c887d5428043bab7af259386d9bda5dd1fd59f8 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sun, 6 Sep 2026 18:07:20 +0800 Subject: cleanup/fix: cargo --- Cargo.lock | 26 ++++++++++++++++++++++++++ kernel/.cargo/config.toml | 6 ++++++ kernel/Cargo.toml | 10 ++++++++++ 3 files changed, 42 insertions(+) create mode 100644 kernel/.cargo/config.toml diff --git a/Cargo.lock b/Cargo.lock index 7b6f4a9..af68faf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -130,6 +130,20 @@ name = "bytemuck" version = "1.25.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f65693059b6b9c588b9f62fed1cedbf0a8b805631457ea162d68f0de186f3de5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] [[package]] name = "byteorder" @@ -364,8 +378,11 @@ version = "0.1.0" dependencies = [ "acpi", "atomic", + "bitflags 2.13.1", "bootloader_api", + "bytemuck", "linkme", + "spin", "uart_16550", ] @@ -672,6 +689,15 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" +[[package]] +name = "spin" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0134f9043ed38b087ac4f7d4af44c79e2c9e5094421fe3164f435ce585953b10" +dependencies = [ + "lock_api", +] + [[package]] name = "spinning_top" version = "0.3.0" diff --git a/kernel/.cargo/config.toml b/kernel/.cargo/config.toml new file mode 100644 index 0000000..3ec0bff --- /dev/null +++ b/kernel/.cargo/config.toml @@ -0,0 +1,6 @@ +[unstable] +build-std = ["core", "compiler_builtins", "alloc"] +build-std-features = ["compiler-builtins-mem"] + +[build] +target = "x86_64-unknown-none" diff --git a/kernel/Cargo.toml b/kernel/Cargo.toml index e1e5f5a..10b152b 100644 --- a/kernel/Cargo.toml +++ b/kernel/Cargo.toml @@ -6,6 +6,16 @@ edition = "2024" [dependencies] acpi = "6.1.1" atomic = "0.6.1" +bitflags = "2.13.1" bootloader_api = { git = "https://github.com/rust-osdev/bootloader" } +bytemuck = { version = "1.25.2", features = ["derive"] } linkme = "0.3.37" +spin = "0.12.3" uart_16550 = "0.8.0" + +[profile.dev] +debug = true +panic = "abort" + +[profile.release] +panic = "abort" -- cgit v1.2.3