Skip to content

Commit ced31d7

Browse files
authored
Merge branch 'main' into main
2 parents aa6d4b2 + d2776c6 commit ced31d7

40 files changed

+534
-445
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ trim_trailing_whitespace = true
1212
indent_style = space
1313
indent_size = 4
1414

15-
[*.{json,md,nix,yml}]
15+
[*.{json,md,nix,toml,yml}]
1616
indent_style = space
1717
indent_size = 2

.github/workflows/qa.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ jobs:
77
steps:
88
- uses: actions/checkout@v4
99
# Executes "typos ."
10-
- uses: crate-ci/typos@v1.19.0
10+
- uses: crate-ci/typos@v1.20.8

.github/workflows/rust.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ on:
1111
- version-*
1212
schedule:
1313
- cron: '0 0 * * 0-6'
14+
env:
15+
RUSTFLAGS: -D warnings
1416
jobs:
1517
test_aarch64:
1618
name: Integration Test (AArch64)

.typos.toml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,19 @@
22

33
[files]
44
extend-exclude = [
5-
# "uefi/src/table/boot.rs"
5+
# Generated sources
6+
"uefi/src/proto/device_path/device_path_gen.rs"
7+
]
8+
9+
[default]
10+
extend-ignore-identifiers-re = [
11+
# uefi-raw/src/protocol/device_path.rs
12+
"PnP"
613
]
714

815
[default.extend-words]
9-
# FOOBAR = "FOOBAR"
16+
# ./uefi-test-runner/src/proto/device_path.rs:92:14
17+
HD = "HD"
1018

1119
[default.extend-identifiers]
12-
# FOOBAR = "FOOBAR"
1320

Cargo.lock

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

README.md

Lines changed: 71 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,70 +2,100 @@
22

33
[![Crates.io](https://img.shields.io/crates/v/uefi)](https://crates.io/crates/uefi)
44
[![Docs.rs](https://docs.rs/uefi/badge.svg)](https://docs.rs/uefi)
5-
![Stars](https://img.shields.io/github/stars/rust-osdev/uefi-rs)
65
![License](https://img.shields.io/github/license/rust-osdev/uefi-rs)
76
![Build status](https://github.com/rust-osdev/uefi-rs/workflows/Rust/badge.svg)
7+
![Stars](https://img.shields.io/github/stars/rust-osdev/uefi-rs)
88

99
## Description
1010

11-
[UEFI] is the successor to the BIOS. It provides an early boot environment for
12-
OS loaders, hypervisors and other low-level applications. While it started out
13-
as x86-specific, it has been adopted on other platforms, such as ARM.
11+
[UEFI] started as the successor firmware to the BIOS in x86 space and developed
12+
to a universal firmware specification for various platforms, such as ARM. It
13+
provides an early boot environment with a variety of [specified][spec]
14+
ready-to-use "high-level" functionality, such as accessing disks or the network.
15+
EFI images, the files that can be loaded by an UEFI environment, can leverage
16+
these abstractions to extend the functionality in form of additional drivers,
17+
OS-specific bootloaders, or different kind of low-level applications.
18+
19+
Our mission is to provide **safe** and **performant** wrappers for UEFI
20+
interfaces, and allow developers to write idiomatic Rust code.
21+
22+
This repository provides various crates:
23+
24+
- `uefi-raw`: Raw Rust UEFI bindings for basic structures and functions.
25+
- `uefi`: High-level wrapper around various low-level UEFI APIs. \
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`.
1429

15-
This crate makes it easy to both:
16-
- Write UEFI applications in Rust (for `i686`, `x86_64`, or `aarch64`)
17-
- Call UEFI functions from an OS (usually built with a [custom target][rustc-custom])
1830

19-
The objective is to provide **safe** and **performant** wrappers for UEFI interfaces,
20-
and allow developers to write idiomatic Rust code.
31+
You can use the abstractions for example to:
2132

22-
Check out [the UEFI application template](template) for a quick start.
33+
- create OS-specific loaders and leverage UEFI boot service
34+
- access UEFI runtime services from an OS
35+
36+
All crates are compatible with all platforms that both the Rust compiler and
37+
UEFI support, such as `i686`, `x86_64`, and `aarch64`). Please note that we
38+
can't test all possible hardware/firmware/platform combinations.
2339

2440
[UEFI]: https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface
25-
[rustc-custom]: https://doc.rust-lang.org/rustc/targets/custom.html
2641

27-
![uefi-rs running in QEMU](https://imgur.com/SFPSVuO.png)
42+
![UEFI App running in QEMU](https://imgur.com/SFPSVuO.png)
43+
Screenshot of an application running in QEMU on an UEFI firmware that leverages
44+
our Rust library.
45+
46+
## User Documentation
47+
48+
<!-- KEEP IN SYNC WITH uefi/README -->
49+
50+
For a quick start, please check out [the UEFI application template](template).
51+
52+
The [uefi-rs book] contains a tutorial, how-tos, and overviews of some important
53+
UEFI concepts. Reference documentation for the various crates can be found on
54+
[docs.rs]:
55+
56+
- [docs.rs/uefi](https://docs.rs/uefi)
57+
- [docs.rs/uefi-macros](https://docs.rs/uefi-macros)
58+
- [docs.rs/uefi-raw](https://docs.rs/uefi-raw)
59+
60+
For additional information, refer to the [UEFI specification][spec].
61+
62+
[spec]: https://uefi.org/specs/UEFI/2.10
63+
[uefi-rs book]: https://rust-osdev.github.io/uefi-rs/HEAD
64+
[docs.rs]: https://docs.rs
65+
66+
### MSRV
67+
68+
See the [uefi package's README](uefi/README.md#MSRV).
2869

29-
## Project structure
70+
## Developer Guide
71+
72+
### Project structure
3073

3174
This project contains multiple sub-crates:
3275

3376
- `uefi`: defines the standard UEFI tables / interfaces.
3477
The objective is to stay unopinionated and safely wrap most interfaces.
3578

36-
- `uefi-macros`: procedural macros that are used to derive some traits in `uefi`.
79+
- `uefi-macros`: procedural macros that are used to derive some traits
80+
in `uefi`.
3781

3882
- `uefi-raw`: raw types that closely match the definitions in the UEFI
3983
Specification. Safe wrappers for these types are provided by the `uefi`
4084
crate. The raw types are suitable for implementing UEFI firmware.
4185

42-
- `uefi-services`: provides a panic handler, and initializes the `alloc` / `logger` features.
86+
- `uefi-services`: provides a panic handler, and initializes
87+
the `alloc` / `logger` features.
4388

4489
- `uefi-test-runner`: a UEFI application that runs unit / integration tests.
4590

4691
[log]: https://github.com/rust-lang-nursery/log
4792

48-
## Documentation
49-
50-
The [uefi-rs book] contains a tutorial, how-tos, and overviews of some
51-
important UEFI concepts.
52-
53-
Reference documentation can be found on docs.rs:
54-
- [docs.rs/uefi](https://docs.rs/uefi)
55-
- [docs.rs/uefi-macros](https://docs.rs/uefi-macros)
56-
- [docs.rs/uefi-raw](https://docs.rs/uefi-raw)
57-
- [docs.rs/uefi-services](https://docs.rs/uefi-services)
58-
59-
For additional information, refer to the [UEFI specification][spec].
60-
61-
[spec]: http://www.uefi.org/specifications
62-
[uefi-rs book]: https://rust-osdev.github.io/uefi-rs/HEAD
63-
64-
## Building and testing uefi-rs
93+
### Building and testing uefi-rs
6594

6695
Use the `cargo xtask` command to build and test the crate.
6796

6897
Available commands:
98+
6999
- `build`: build all the UEFI packages
70100
- `--release`: build in release mode
71101
- `--target {x86_64,ia32,aarch64}`: choose target UEFI arch
@@ -77,9 +107,10 @@ Available commands:
77107
- `--warnings-as-errors`: treat warnings as errors
78108
- `run`: build `uefi-test-runner` and run it in QEMU
79109
- `--ci`: disable some tests that don't work in the CI
80-
- `--disable-kvm`: disable hardware accelerated virtualization support in QEMU.
81-
Especially useful if you want to run the tests under
82-
[WSL](https://docs.microsoft.com/en-us/windows/wsl) on Windows.
110+
- `--disable-kvm`: disable hardware accelerated virtualization support in
111+
QEMU.
112+
Especially useful if you want to run the tests under
113+
[WSL](https://docs.microsoft.com/en-us/windows/wsl) on Windows.
83114
- `--example <NAME>`: run an example instead of the main binary.
84115
- `--headless`: run QEMU without a GUI
85116
- `--ovmf-code <PATH>`: path of an OVMF code file
@@ -94,18 +125,16 @@ most of the library's functionality.
94125
Check out the testing project's [`README.md`](uefi-test-runner/README.md) for
95126
prerequisites for running the tests.
96127

97-
## MSRV
98-
99-
See the [uefi package's README](uefi/README.md#MSRV).
100-
101128
## Contributing
102129

103-
We welcome issues and pull requests! For instructions on how to set up a development
104-
environment and how to add new protocols, check out [CONTRIBUTING.md](CONTRIBUTING.md).
130+
We welcome issues and pull requests! For instructions on how to set up a
131+
development environment and how to add new protocols, check out
132+
[CONTRIBUTING.md](CONTRIBUTING.md).
105133

106134
## License
107135

108136
The code in this repository is licensed under the Mozilla Public License 2.
109-
This license allows you to use the crate in proprietary programs, but any modifications to the files must be open-sourced.
137+
This license allows you to use the crate in proprietary programs, but any
138+
modifications to the files must be open-sourced.
110139

111140
The full text of the license is available in the [license file](LICENSE).

nix/sources.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"nixpkgs": {
3-
"branch": "nixos-23.05",
3+
"branch": "nixos-23.11",
44
"description": "Nix Packages collection",
55
"homepage": null,
66
"owner": "NixOS",
77
"repo": "nixpkgs",
8-
"rev": "da4024d0ead5d7820f6bd15147d3fe2a0c0cec73",
9-
"sha256": "1y12a4hgxx2lixrcbyhycwxvrrfik1lxjnwkprar0r6173rwy9ax",
8+
"rev": "e38d7cb66ea4f7a0eb6681920615dfcc30fc2920",
9+
"sha256": "1shml3mf52smfra0x3mpfixddr4krp3n78fc2sv07ghiphn22k43",
1010
"type": "tarball",
11-
"url": "https://github.com/NixOS/nixpkgs/archive/da4024d0ead5d7820f6bd15147d3fe2a0c0cec73.tar.gz",
11+
"url": "https://github.com/NixOS/nixpkgs/archive/e38d7cb66ea4f7a0eb6681920615dfcc30fc2920.tar.gz",
1212
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
1313
},
1414
"rust-overlay": {
@@ -17,10 +17,10 @@
1717
"homepage": "",
1818
"owner": "oxalica",
1919
"repo": "rust-overlay",
20-
"rev": "e485313fc485700a9f1f9b8b272ddc0621d08357",
21-
"sha256": "1v1gq022rnni6mm42pxmw6c5yy9il4jb2l92irh154ax616x2rzd",
20+
"rev": "ece8bdb3c3b58def25f204b9a1261dee55d7c9c0",
21+
"sha256": "1avinp5vcaicbjssmfwwfii5v8gab6ygh2hfmg4jli822469p5si",
2222
"type": "tarball",
23-
"url": "https://github.com/oxalica/rust-overlay/archive/e485313fc485700a9f1f9b8b272ddc0621d08357.tar.gz",
23+
"url": "https://github.com/oxalica/rust-overlay/archive/ece8bdb3c3b58def25f204b9a1261dee55d7c9c0.tar.gz",
2424
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
2525
}
2626
}

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"

0 commit comments

Comments
 (0)