Skip to content

Commit 0aed47a

Browse files
authored
Merge pull request #1294 from phip1611/doc7
doc: final README streamlining [doc: 6/6]
2 parents 03dc5e9 + b9b30af commit 0aed47a

File tree

3 files changed

+37
-88
lines changed

3 files changed

+37
-88
lines changed

README.md

+21-61
Original file line numberDiff line numberDiff line change
@@ -11,77 +11,37 @@ This crate makes it easy to develop Rust software that leverages **safe**,
1111
![Build status](https://github.com/rust-osdev/uefi-rs/workflows/Rust/badge.svg)
1212
![Stars](https://img.shields.io/github/stars/rust-osdev/uefi-rs)
1313

14-
## Description
15-
16-
Our mission is to provide **safe** and **performant** wrappers for UEFI
17-
interfaces, and allow developers to write idiomatic Rust code.
18-
19-
This repository provides various crates:
20-
21-
- `uefi-raw`: Raw Rust UEFI bindings for basic structures and functions.
22-
- `uefi`: High-level wrapper around various low-level UEFI APIs. \
23-
Offers various optional features for typical Rust convenience, such as a
24-
Logger and an Allocator. (_This is what you are usually looking for!_)
25-
- `uefi-macros`: Helper macros. Used by `uefi`.
26-
27-
28-
You can use the abstractions for example to:
29-
30-
- create OS-specific loaders and leverage UEFI boot service
31-
- access UEFI runtime services from an OS
32-
33-
[UEFI]: https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface
34-
3514
![UEFI App running in QEMU](https://imgur.com/SFPSVuO.png)
3615
Screenshot of an application running in QEMU on an UEFI firmware that leverages
3716
our Rust library.
3817

39-
## User Documentation
40-
41-
<!-- KEEP IN SYNC WITH uefi/README -->
42-
43-
For a quick start, please check out [the UEFI application template](template).
18+
## API and User Documentation
19+
<!-- This section is duplicated with uefi/README.md -->
4420

45-
The [uefi-rs book] contains a tutorial, how-tos, and overviews of some important
46-
UEFI concepts. Reference documentation for the various crates can be found on
47-
[docs.rs]:
48-
49-
- [docs.rs/uefi](https://docs.rs/uefi)
50-
- [docs.rs/uefi-macros](https://docs.rs/uefi-macros)
51-
- [docs.rs/uefi-raw](https://docs.rs/uefi-raw)
52-
53-
For additional information, refer to the [UEFI specification][spec].
54-
55-
[spec]: https://uefi.org/specs/UEFI/2.10
56-
[uefi-rs book]: https://rust-osdev.github.io/uefi-rs/HEAD
57-
[docs.rs]: https://docs.rs
58-
59-
### MSRV
60-
61-
See the [uefi package's README](uefi/README.md#MSRV).
21+
The main contribution of this project is the [`uefi` crate](./uefi/README.md).
22+
Please refer to [docs.rs](https://docs.rs/uefi) for comprehensive documentation
23+
of the **latest stable release**. The latest not necessarily yet published
24+
documentation can be found in [`src/lib.rs`](./uefi/src/lib.rs), which can also
25+
be locally viewed by running `$ cargo xtask doc --open`.
6226

6327
## Developer Guide
6428

65-
### Project structure
66-
67-
This project contains multiple sub-crates:
29+
### Repository Structure
6830

69-
- `uefi`: defines the standard UEFI tables / interfaces.
70-
The objective is to stay unopinionated and safely wrap most interfaces.
71-
Additional opinionated features (such as a Logger) are feature-gated.
72-
73-
- `uefi-macros`: procedural macros that are used to derive some traits
74-
in `uefi`.
75-
76-
- `uefi-raw`: raw types that closely match the definitions in the UEFI
77-
Specification. Safe wrappers for these types are provided by the `uefi`
78-
crate. The raw types are suitable for implementing UEFI firmware.
79-
80-
- `uefi-std-example`: Example UEFI app but as Rust standard binary.
81-
82-
- `uefi-test-runner`: a UEFI application that runs unit / integration tests.
31+
This repository provides various crates:
8332

84-
[log]: https://github.com/rust-lang-nursery/log
33+
- [`uefi`](/uefi/README.md): High-level wrapper around various low-level UEFI
34+
APIs. This crate makes it easy to develop Rust software that leverages safe,
35+
convenient, and performant abstractions for UEFI functionality.
36+
This is the **main contribution** of this project.
37+
- [`uefi-raw`](/uefi-raw/README.md): Raw ABI-compatible types that closely
38+
match the definitions in the UEFI Specification. They are suitable for
39+
implementing UEFI firmware or creating interfaces to it.
40+
- [`uefi-macros`](/uefi-macros/README.md): Helper macros used by `uefi`.
41+
- [`uefi-test-runner`](/uefi-test-runner/README.md): A UEFI application that
42+
runs our integration tests.
43+
- [`uefi-std-example`](/uefi-std-example/README.md): Example UEFI app but as
44+
Rust standard binary.
8545

8646
### Building and testing uefi-rs
8747

uefi/README.md

+12-23
Original file line numberDiff line numberDiff line change
@@ -22,29 +22,18 @@ parse the UEFI memory map.
2222
_Note that for producing UEFI images, you also need to use a corresponding
2323
`uefi` compiler target of Rust, such as `x86_64-unknown-uefi`._
2424

25-
For an introduction to the `uefi-rs` project and documentation, please refer to
26-
our main [README].
27-
28-
[README]: https://github.com/rust-osdev/uefi-rs/blob/main/README.md
29-
30-
## Optional features
31-
32-
This crate's features are described in [`src/lib.rs`].
33-
34-
[`src/lib.rs`]: src/lib.rs
35-
36-
## MSRV
37-
38-
The minimum supported Rust version is currently 1.70.
39-
40-
Our policy is to support at least the past two stable releases.
41-
42-
## License
43-
44-
The code in this repository is licensed under the Mozilla Public License 2.
45-
This license allows you to use the crate in proprietary programs, but any modifications to the files must be open-sourced.
46-
47-
The full text of the license is available in the [license file](LICENSE).
25+
## API and User Documentation
26+
<!-- This section is duplicated with /README.md -->
27+
28+
Please refer to [docs.rs](https://docs.rs/uefi) for comprehensive documentation
29+
of the **latest stable release**. The latest not necessarily yet published
30+
documentation can be found in [`src/lib.rs`](./src/lib.rs), which can also be
31+
locally viewed by running `$ cargo xtask doc --open`.
32+
33+
For an introduction to the `uefi-rs` project and this repository, please refer
34+
to our main [README](https://github.com/rust-osdev/uefi-rs/blob/main/README.md).
35+
<!-- ^ This link can't be relative as it also should work in the packaged crate
36+
on crates.io. -->
4837

4938

5039
[UEFI]: https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface

uefi/src/lib.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -205,17 +205,17 @@
205205
//! [`BootServices`]: table::boot::BootServices
206206
//! [`GlobalAlloc`]: alloc::alloc::GlobalAlloc
207207
//! [`SystemTable`]: table::SystemTable
208-
//! [`r-efi`]: https://crates.io/crates/r-efi
209-
//! [`entry-macro`]: uefi_macros::entry
210208
//! [`ctr16!`]: crate::cstr16
209+
//! [`entry-macro`]: uefi_macros::entry
210+
//! [`r-efi`]: https://crates.io/crates/r-efi
211211
//! [`unsafe_protocol`]: proto::unsafe_protocol
212212
//! [contributing]: https://github.com/rust-osdev/uefi-rs/blob/main/CONTRIBUTING.md
213213
//! [issue tracker]: https://github.com/rust-osdev/uefi-rs/issues
214+
//! [rustc-uefi-std]: https://doc.rust-lang.org/nightly/rustc/platform-support/unknown-uefi.html
214215
//! [spec]: https://uefi.org/specifications
215216
//! [template]: https://github.com/rust-osdev/uefi-rs/tree/main/template
216-
//! [unstable features]: https://doc.rust-lang.org/unstable-book/
217-
//! [rustc-uefi-std]: https://doc.rust-lang.org/nightly/rustc/platform-support/unknown-uefi.html
218217
//! [uefi-std-tr-issue]: https://github.com/rust-lang/rust/issues/100499
218+
//! [unstable features]: https://doc.rust-lang.org/unstable-book/
219219
220220
#![cfg_attr(all(feature = "unstable", feature = "alloc"), feature(allocator_api))]
221221
#![cfg_attr(docsrs, feature(doc_auto_cfg))]

0 commit comments

Comments
 (0)