Skip to content

Commit 92ba86e

Browse files
authored
Merge pull request #1127 from phip1611/doc2
doc: update README
2 parents 11595f3 + 4035cfa commit 92ba86e

File tree

1 file changed

+69
-42
lines changed

1 file changed

+69
-42
lines changed

README.md

Lines changed: 69 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2,70 +2,98 @@
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+
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.
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])
30+
You can use the abstractions for example to:
1831

19-
The objective is to provide **safe** and **performant** wrappers for UEFI interfaces,
20-
and allow developers to write idiomatic Rust code.
32+
- create OS-specific loaders and leverage UEFI boot service
33+
- access UEFI runtime services from an OS
2134

22-
Check out [the UEFI application template](template) for a quick start.
35+
All crates are compatible with all platforms that both the Rust compiler and
36+
UEFI support, such as `i686`, `x86_64`, and `aarch64`). Please note that we
37+
can't test all possible hardware/firmware/platform combinations.
2338

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

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

29-
## Project structure
66+
See the [uefi package's README](uefi/README.md#MSRV).
67+
68+
## Developer Guide
69+
70+
### Project structure
3071

3172
This project contains multiple sub-crates:
3273

3374
- `uefi`: defines the standard UEFI tables / interfaces.
3475
The objective is to stay unopinionated and safely wrap most interfaces.
3576

36-
- `uefi-macros`: procedural macros that are used to derive some traits in `uefi`.
77+
- `uefi-macros`: procedural macros that are used to derive some traits
78+
in `uefi`.
3779

3880
- `uefi-raw`: raw types that closely match the definitions in the UEFI
3981
Specification. Safe wrappers for these types are provided by the `uefi`
4082
crate. The raw types are suitable for implementing UEFI firmware.
4183

42-
- `uefi-services`: provides a panic handler, and initializes the `alloc` / `logger` features.
84+
- `uefi-services`: provides a panic handler, and initializes
85+
the `alloc` / `logger` features.
4386

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

4689
[log]: https://github.com/rust-lang-nursery/log
4790

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
91+
### Building and testing uefi-rs
6592

6693
Use the `cargo xtask` command to build and test the crate.
6794

6895
Available commands:
96+
6997
- `build`: build all the UEFI packages
7098
- `--release`: build in release mode
7199
- `--target {x86_64,ia32,aarch64}`: choose target UEFI arch
@@ -77,9 +105,10 @@ Available commands:
77105
- `--warnings-as-errors`: treat warnings as errors
78106
- `run`: build `uefi-test-runner` and run it in QEMU
79107
- `--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.
108+
- `--disable-kvm`: disable hardware accelerated virtualization support in
109+
QEMU.
110+
Especially useful if you want to run the tests under
111+
[WSL](https://docs.microsoft.com/en-us/windows/wsl) on Windows.
83112
- `--example <NAME>`: run an example instead of the main binary.
84113
- `--headless`: run QEMU without a GUI
85114
- `--ovmf-code <PATH>`: path of an OVMF code file
@@ -94,18 +123,16 @@ most of the library's functionality.
94123
Check out the testing project's [`README.md`](uefi-test-runner/README.md) for
95124
prerequisites for running the tests.
96125

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

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).
128+
We welcome issues and pull requests! For instructions on how to set up a
129+
development environment and how to add new protocols, check out
130+
[CONTRIBUTING.md](CONTRIBUTING.md).
105131

106132
## License
107133

108134
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.
135+
This license allows you to use the crate in proprietary programs, but any
136+
modifications to the files must be open-sourced.
110137

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

0 commit comments

Comments
 (0)