Skip to content

Commit 8fb5eff

Browse files
committed
Restructure into sub-crates
1 parent 9583eaf commit 8fb5eff

27 files changed

+199
-204
lines changed

.cargo/config.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
11
[target.x86_64-unknown-uefi]
22
runner = "cargo run -p runner"
3-
4-
[alias]
5-
builder = "run --bin builder --features builder --quiet --"

.vscode/settings.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,12 @@
55
],
66
"rust-analyzer.cargo.target": "x86_64-unknown-uefi",
77
"editor.formatOnSave": true,
8-
"rust-analyzer.cargo.features": [
9-
"uefi_bin"
10-
],
118
"rust-analyzer.checkOnSave.enable": true,
129
"rust-analyzer.checkOnSave.overrideCommand": [
1310
"cargo",
1411
"c",
15-
"--features",
16-
"uefi_bin",
12+
"-p",
13+
"bootloader-x86_64-uefi",
1714
"--target",
1815
"x86_64-unknown-uefi",
1916
"-Zbuild-std=core",

Cargo.lock

Lines changed: 50 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 11 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ edition = "2021"
1010
[workspace]
1111
members = [
1212
"api",
13+
"common",
14+
"uefi",
15+
"bios",
1316
"bios/first_stage",
1417
"tests/runner",
1518
"tests/test_kernels/default_settings",
@@ -18,46 +21,16 @@ members = [
1821
]
1922
exclude = ["examples/basic", "examples/test_framework"]
2023

21-
[[bin]]
22-
name = "builder"
23-
required-features = ["builder"]
24-
25-
[[bin]]
26-
name = "bios"
27-
required-features = ["bios_bin"]
28-
29-
[[bin]]
30-
name = "uefi"
31-
required-features = ["uefi_bin"]
3224

3325
[dependencies]
34-
bootloader_api = { path = "api", version = "0.1.0" }
35-
xmas-elf = { version = "0.6.2", optional = true }
36-
x86_64 = { version = "0.14.7", optional = true, default-features = false, features = [
37-
"instructions",
38-
"inline_asm",
39-
] }
40-
usize_conversions = { version = "0.2.0", optional = true }
41-
bit_field = { version = "0.10.0", optional = true }
42-
log = { version = "0.4.8", optional = true }
43-
uefi = { version = "0.13.0", optional = true }
44-
argh = { version = "0.1.3", optional = true }
45-
displaydoc = { version = "0.1.7", optional = true }
46-
conquer-once = { version = "0.2.1", optional = true, default-features = false }
47-
spinning_top = { version = "0.2.1", optional = true }
48-
anyhow = { version = "1.0.32", optional = true }
49-
llvm-tools = { version = "0.1.1", optional = true }
50-
thiserror = { version = "1.0.20", optional = true }
51-
json = { version = "0.12.4", optional = true }
52-
rsdp = { version = "1.0.0", optional = true }
53-
fatfs = { version = "0.3.4", optional = true }
54-
gpt = { version = "3.0.0", optional = true }
55-
56-
[dependencies.font8x8]
57-
version = "0.2.5"
58-
default-features = false
59-
features = ["unicode"]
60-
optional = true
26+
argh = "0.1.3"
27+
displaydoc = "0.1.7"
28+
anyhow = "1.0.32"
29+
llvm-tools = "0.1.1"
30+
thiserror = "1.0.20"
31+
json = "0.12.4"
32+
fatfs = "0.3.4"
33+
gpt = "3.0.0"
6134

6235
[build-dependencies]
6336
llvm-tools-build = { version = "0.1", optional = true, package = "llvm-tools" }
@@ -66,34 +39,6 @@ serde = { version = "1.0", features = ["derive"], optional = true }
6639
quote = { version = "1.0", optional = true }
6740
proc-macro2 = { version = "1.0", optional = true }
6841

69-
[features]
70-
default = []
71-
builder = [
72-
"argh",
73-
"thiserror",
74-
"displaydoc",
75-
"anyhow",
76-
"llvm-tools",
77-
"json",
78-
"fatfs",
79-
"gpt",
80-
]
81-
bios_bin = ["binary", "rsdp"]
82-
uefi_bin = ["binary", "uefi"]
83-
binary = [
84-
"llvm-tools-build",
85-
"x86_64",
86-
"toml",
87-
"xmas-elf",
88-
"usize_conversions",
89-
"log",
90-
"conquer-once",
91-
"spinning_top",
92-
"serde",
93-
"font8x8",
94-
"quote",
95-
"proc-macro2",
96-
]
9742

9843
[profile.dev]
9944
panic = "abort"

bios/Cargo.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[package]
2+
name = "bootloader-x86_64-bios"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
7+
8+
[dependencies]
9+
bootloader_api = { version = "0.1.0", path = "../api" }
10+
bootloader-x86_64-common = { version = "0.1.0", path = "../common" }
11+
log = "0.4.14"
12+
x86_64 = "0.14.8"
13+
usize_conversions = "0.2.0"
14+
rsdp = "2.0.0"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)