Skip to content

Commit ccc75a2

Browse files
committed
chore(workspace): move most things into the workspace
1 parent 9c12e5f commit ccc75a2

4 files changed

Lines changed: 39 additions & 49 deletions

File tree

Cargo.lock

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

Cargo.toml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,28 @@ members = [
44
]
55
resolver = "3"
66

7-
[profile.dev]
8-
# We have to compile for opt-level = 2 due to optimization passes
7+
[workspace.package]
8+
license = "Apache-2.0"
9+
version = "0.0.17"
10+
homepage = "https://sprout.edera.dev"
11+
repository = "https://github.com/edera-dev/sprout"
12+
edition = "2024"
13+
14+
[workspace.dependencies]
15+
anyhow = "1.0.100"
16+
bitflags = "2.10.0"
17+
hex = "0.4.3"
18+
log = "0.4.28"
19+
serde = "1.0.228"
20+
sha2 = "0.10.9"
21+
toml = "0.9.8"
22+
uefi = "0.36.0"
23+
uefi-raw = "0.12.0"
24+
25+
# Common build profiles
26+
# NOTE: We have to compile everything for opt-level = 2 due to optimization passes
927
# which don't handle the UEFI target properly.
28+
[profile.dev]
1029
opt-level = 2
1130

1231
[profile.release]

crates/sprout/Cargo.toml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,30 @@
11
[package]
22
name = "edera-sprout"
33
description = "Modern UEFI bootloader"
4-
license = "Apache-2.0"
5-
version = "0.0.17"
6-
homepage = "https://sprout.edera.dev"
7-
repository = "https://github.com/edera-dev/sprout"
8-
edition = "2024"
4+
license.workspace = true
5+
version.workspace = true
6+
homepage.workspace = true
7+
repository.workspace = true
8+
edition.workspace = true
99

1010
[dependencies]
11-
anyhow = "1.0.100"
12-
bitflags = "2.10.0"
13-
toml = "0.9.8"
14-
log = "0.4.28"
11+
anyhow.workspace = true
12+
bitflags.workspace = true
13+
hex.workspace = true
14+
sha2.workspace = true
15+
toml.workspace = true
16+
log.workspace = true
1517

1618
[dependencies.serde]
17-
version = "1.0.228"
19+
workspace = true
1820
features = ["derive"]
1921

20-
[dependencies.sha256]
21-
version = "1.6.0"
22-
default-features = false
23-
2422
[dependencies.uefi]
25-
version = "0.36.0"
23+
workspace = true
2624
features = ["alloc", "logger"]
2725

2826
[dependencies.uefi-raw]
29-
version = "0.12.0"
27+
workspace = true
3028

3129
[[bin]]
3230
name = "sprout"

crates/sprout/src/utils.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use anyhow::{Context, Result, bail};
2+
use sha2::{Digest, Sha256};
23
use std::ops::Deref;
34
use uefi::boot::SearchType;
45
use uefi::fs::{FileSystem, Path};
@@ -201,7 +202,7 @@ pub fn combine_options<T: AsRef<str>>(options: impl Iterator<Item = T>) -> Strin
201202
/// Produce a unique hash for the input.
202203
/// This uses SHA-256, which is unique enough but relatively short.
203204
pub fn unique_hash(input: &str) -> String {
204-
sha256::digest(input.as_bytes())
205+
hex::encode(Sha256::digest(input.as_bytes()))
205206
}
206207

207208
/// Represents the type of partition GUID that can be retrieved.

0 commit comments

Comments
 (0)