chore(workspace): move most things into the workspace

This commit is contained in:
2025-11-02 22:35:07 -05:00
parent 9c12e5f12f
commit ccc75a2e14
4 changed files with 39 additions and 49 deletions

32
Cargo.lock generated
View File

@@ -8,17 +8,6 @@ version = "1.0.100"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61"
[[package]]
name = "async-trait"
version = "0.1.89"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "bit_field"
version = "0.10.3"
@@ -40,12 +29,6 @@ dependencies = [
"generic-array",
]
[[package]]
name = "bytes"
version = "1.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a"
[[package]]
name = "cfg-if"
version = "1.0.4"
@@ -87,9 +70,10 @@ version = "0.0.17"
dependencies = [
"anyhow",
"bitflags",
"hex",
"log",
"serde",
"sha256",
"sha2",
"toml",
"uefi",
"uefi-raw",
@@ -233,18 +217,6 @@ dependencies = [
"digest",
]
[[package]]
name = "sha256"
version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f880fc8562bdeb709793f00eb42a2ad0e672c4f883bbe59122b926eca935c8f6"
dependencies = [
"async-trait",
"bytes",
"hex",
"sha2",
]
[[package]]
name = "syn"
version = "2.0.108"

View File

@@ -4,9 +4,28 @@ members = [
]
resolver = "3"
[profile.dev]
# We have to compile for opt-level = 2 due to optimization passes
[workspace.package]
license = "Apache-2.0"
version = "0.0.17"
homepage = "https://sprout.edera.dev"
repository = "https://github.com/edera-dev/sprout"
edition = "2024"
[workspace.dependencies]
anyhow = "1.0.100"
bitflags = "2.10.0"
hex = "0.4.3"
log = "0.4.28"
serde = "1.0.228"
sha2 = "0.10.9"
toml = "0.9.8"
uefi = "0.36.0"
uefi-raw = "0.12.0"
# Common build profiles
# NOTE: We have to compile everything for opt-level = 2 due to optimization passes
# which don't handle the UEFI target properly.
[profile.dev]
opt-level = 2
[profile.release]

View File

@@ -1,32 +1,30 @@
[package]
name = "edera-sprout"
description = "Modern UEFI bootloader"
license = "Apache-2.0"
version = "0.0.17"
homepage = "https://sprout.edera.dev"
repository = "https://github.com/edera-dev/sprout"
edition = "2024"
license.workspace = true
version.workspace = true
homepage.workspace = true
repository.workspace = true
edition.workspace = true
[dependencies]
anyhow = "1.0.100"
bitflags = "2.10.0"
toml = "0.9.8"
log = "0.4.28"
anyhow.workspace = true
bitflags.workspace = true
hex.workspace = true
sha2.workspace = true
toml.workspace = true
log.workspace = true
[dependencies.serde]
version = "1.0.228"
workspace = true
features = ["derive"]
[dependencies.sha256]
version = "1.6.0"
default-features = false
[dependencies.uefi]
version = "0.36.0"
workspace = true
features = ["alloc", "logger"]
[dependencies.uefi-raw]
version = "0.12.0"
workspace = true
[[bin]]
name = "sprout"

View File

@@ -1,4 +1,5 @@
use anyhow::{Context, Result, bail};
use sha2::{Digest, Sha256};
use std::ops::Deref;
use uefi::boot::SearchType;
use uefi::fs::{FileSystem, Path};
@@ -201,7 +202,7 @@ pub fn combine_options<T: AsRef<str>>(options: impl Iterator<Item = T>) -> Strin
/// Produce a unique hash for the input.
/// This uses SHA-256, which is unique enough but relatively short.
pub fn unique_hash(input: &str) -> String {
sha256::digest(input.as_bytes())
hex::encode(Sha256::digest(input.as_bytes()))
}
/// Represents the type of partition GUID that can be retrieved.