Skip to content

Commit 6807825

Browse files
Merge pull request #1128 from phip1611/remove-uefi-services
Deprecate `uefi-services` and add `uefi::helpers` as replacement
2 parents 92ba86e + 9a257a0 commit 6807825

28 files changed

+344
-343
lines changed

Cargo.lock

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

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ This repository provides various crates:
2323

2424
- `uefi-raw`: Raw Rust UEFI bindings for basic structures and functions.
2525
- `uefi`: High-level wrapper around various low-level UEFI APIs. \
26-
Most probably, you want to use this crate.
27-
- `uefi-services`: Optional Rust convenience with a global allocator and a
28-
`log`-based logger implementation.
26+
Offers various optional features for typical Rust convenience, such as a
27+
Logger and an Allocator. (_This is what you are usually looking for!_)
28+
- `uefi-macros`: Helper macros. Used by `uefi`.
29+
2930

3031
You can use the abstractions for example to:
3132

@@ -44,6 +45,8 @@ our Rust library.
4445

4546
## User Documentation
4647

48+
<!-- KEEP IN SYNC WITH uefi/README -->
49+
4750
For a quick start, please check out [the UEFI application template](template).
4851

4952
The [uefi-rs book] contains a tutorial, how-tos, and overviews of some important
@@ -53,7 +56,6 @@ UEFI concepts. Reference documentation for the various crates can be found on
5356
- [docs.rs/uefi](https://docs.rs/uefi)
5457
- [docs.rs/uefi-macros](https://docs.rs/uefi-macros)
5558
- [docs.rs/uefi-raw](https://docs.rs/uefi-raw)
56-
- [docs.rs/uefi-services](https://docs.rs/uefi-services)
5759

5860
For additional information, refer to the [UEFI specification][spec].
5961

template/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ publish = false
66

77
[dependencies]
88
uefi = { version = "0.27.0", features = ["alloc"] }
9-
uefi-services = "0.24.0"

template/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use uefi::prelude::*;
55

66
#[entry]
77
fn main(_handle: Handle, mut system_table: SystemTable<Boot>) -> Status {
8-
uefi_services::init(&mut system_table).unwrap();
8+
uefi::helpers::init(&mut system_table).unwrap();
99

1010
Status::SUCCESS
1111
}

uefi-services/CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# uefi-services - [Unreleased]
22

33
## Changed
4-
- The implicit `qemu-exit` crate feature has been removed. (Note that this is
5-
different from the `qemu` crate feature, which is unchanged.)
4+
- `uefi-services` is deprecated and should be removed. All functionality was
5+
moved to `uefi::helpers::init()`
66

77
# uefi-services - 0.23.0 (2023-11-12)
88

uefi-services/Cargo.toml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "uefi-services"
33
version = "0.24.0"
44
readme = "README.md"
5-
description = "Higher-level utilities for the `uefi` crate."
5+
description = "Deprecated. Please migrate to `uefi::helpers`."
66

77
authors.workspace = true
88
categories.workspace = true
@@ -14,13 +14,10 @@ rust-version.workspace = true
1414

1515
[dependencies]
1616
uefi = { version = "0.27.0", features = ["global_allocator"] }
17-
log.workspace = true
18-
cfg-if = "1.0.0"
19-
qemu-exit = { version = "3.0.1", optional = true }
2017

2118
[features]
2219
default = ["panic_handler", "logger"]
2320
# Enable QEMU-specific functionality
24-
qemu = ["dep:qemu-exit"]
25-
panic_handler = []
21+
qemu = ["uefi/qemu"]
22+
panic_handler = [ "uefi/panic_handler" ]
2623
logger = ["uefi/logger"]

uefi-services/README.md

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,3 @@
11
# uefi-services
22

3-
[![Crates.io](https://img.shields.io/crates/v/uefi-services)](https://crates.io/crates/uefi-services)
4-
[![Docs.rs](https://docs.rs/uefi-macros/badge.svg)](https://docs.rs/uefi-services)
5-
6-
This crate enables you some convenience features on top of the
7-
[`uefi`](https://crates.io/crates/uefi) crate. It includes a panic handler, a logger, and
8-
a global allocator.
9-
10-
`uefi-services` is part of the `uefi-rs` project. Please refer to
11-
<https://github.com/rust-osdev/uefi-rs/> for comprehensive documentation.
12-
13-
## Optional features
14-
15-
This crate's features are described in [`src/lib.rs`].
16-
17-
[`src/lib.rs`]: src/lib.rs
3+
WARNING: `uefi-services` is deprecated. Functionality was moved to `uefi::helpers::init`.

uefi-services/build.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
println!("cargo:warning=`uefi-services` is deprecated. Functionality was moved to `uefi::helpers::init`.");
3+
}

0 commit comments

Comments
 (0)