Skip to content

Deprecate uefi-services and add uefi::helpers as replacement #1128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ This repository provides various crates:

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


You can use the abstractions for example to:

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

## User Documentation

<!-- KEEP IN SYNC WITH uefi/README -->

For a quick start, please check out [the UEFI application template](template).

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

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

Expand Down
1 change: 0 additions & 1 deletion template/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@ publish = false

[dependencies]
uefi = { version = "0.27.0", features = ["alloc"] }
uefi-services = "0.24.0"
2 changes: 1 addition & 1 deletion template/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use uefi::prelude::*;

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

Status::SUCCESS
}
4 changes: 2 additions & 2 deletions uefi-services/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# uefi-services - [Unreleased]

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

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

Expand Down
9 changes: 3 additions & 6 deletions uefi-services/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "uefi-services"
version = "0.24.0"
readme = "README.md"
description = "Higher-level utilities for the `uefi` crate."
description = "Deprecated. Please migrate to `uefi::helpers`."

authors.workspace = true
categories.workspace = true
Expand All @@ -14,13 +14,10 @@ rust-version.workspace = true

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

[features]
default = ["panic_handler", "logger"]
# Enable QEMU-specific functionality
qemu = ["dep:qemu-exit"]
panic_handler = []
qemu = ["uefi/qemu"]
panic_handler = [ "uefi/panic_handler" ]
logger = ["uefi/logger"]
16 changes: 1 addition & 15 deletions uefi-services/README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
# uefi-services

[![Crates.io](https://img.shields.io/crates/v/uefi-services)](https://crates.io/crates/uefi-services)
[![Docs.rs](https://docs.rs/uefi-macros/badge.svg)](https://docs.rs/uefi-services)

This crate enables you some convenience features on top of the
[`uefi`](https://crates.io/crates/uefi) crate. It includes a panic handler, a logger, and
a global allocator.

`uefi-services` is part of the `uefi-rs` project. Please refer to
<https://github.com/rust-osdev/uefi-rs/> for comprehensive documentation.

## Optional features

This crate's features are described in [`src/lib.rs`].

[`src/lib.rs`]: src/lib.rs
WARNING: `uefi-services` is deprecated. Functionality was moved to `uefi::helpers::init`.
3 changes: 3 additions & 0 deletions uefi-services/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("cargo:warning=`uefi-services` is deprecated. Functionality was moved to `uefi::helpers::init`.");
}
Loading
Loading