Skip to content
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

doc: Comparison to Ecosystem (including Rust std impl) [doc: 4/N] #1292

Merged
merged 2 commits into from
Aug 15, 2024

Conversation

phip1611
Copy link
Member

@phip1611 phip1611 commented Aug 6, 2024

This is split-out 4/N from #1264 to improve reviewability.

This:

  • adds a minimal example in lib.rs so that readers know what to expect from the crate
  • compares uefi to other impls in the ecosystem, especially to the std impl for Rust
  • adds a minimal example for a Rust app built with std and uefi

Steps to Un-draft

Checklist

  • Sensible git history (for example, squash "typo" or "fix" commits). See the Rewriting History guide for help.
  • Update the changelog (if necessary)

@phip1611 phip1611 force-pushed the doc5 branch 2 times, most recently from 299a9f7 to 979c131 Compare August 6, 2024 15:39
@phip1611 phip1611 changed the title doc: move misc stuff from README to lib.rs [doc: 4/N] doc: TODO [doc: 4/N] Aug 6, 2024
@phip1611 phip1611 linked an issue Aug 12, 2024 that may be closed by this pull request
@phip1611 phip1611 changed the title doc: TODO [doc: 4/N] doc: Comparison to Ecosystem (including Rust std impl) [doc: 4/N] Aug 14, 2024
@phip1611 phip1611 marked this pull request as ready for review August 14, 2024 11:16
@phip1611 phip1611 force-pushed the doc5 branch 3 times, most recently from b2ec5d5 to 2f42ea8 Compare August 14, 2024 11:24
uefi/src/lib.rs Outdated
//! to our `uefi-raw` crate, which is part of this project, but more
//! feature-complete. It targets a lower-level than our `uefi` crate does.
//!
//! # MSRV
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The MSRV section was already added to lib.rs in a previous PR, so this can be dropped.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, artifact from a big rebase - I missed that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The duplicate MSRV section is still present

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What?! How? I definitely removed that locally.

Sorry.. I really have no clue how this happened.

@phip1611 phip1611 force-pushed the doc5 branch 3 times, most recently from 6de3a05 to 89dceef Compare August 14, 2024 18:01
@phip1611
Copy link
Member Author

Nice! I will split the "rust-std-example" into a dedicated MR. Can you approve it in its current state, please?

//! Minimal example for an UEFI application using functionality of the
//! `uefi` crate:
//!
//! ```ignore
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With ignore there's a good chance the code will stop compiling over time (in fact currently it's missing a use uefi::println). It's tricky to get no_std code compiling in a doc test, so how about linking to a file that is already tested by CI? Example:

//! ```ignore
#![doc = include_str!("../../template/src/main.rs")]
//! ```

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, great idea! Thanks

@phip1611 phip1611 force-pushed the doc5 branch 2 times, most recently from 3ce42be to b605167 Compare August 15, 2024 16:06
This is especially interesting as the `std` implementation of Rust is upcoming.
@nicholasbishop nicholasbishop added this pull request to the merge queue Aug 15, 2024
Merged via the queue into rust-osdev:main with commit a07379e Aug 15, 2024
13 checks passed
@phip1611 phip1611 deleted the doc5 branch August 15, 2024 16:36
@phip1611
Copy link
Member Author

I'm very happy about the recent documentation additions, especially this one and #1331. This helps, I hope, to position ourself in the long term as the ones that define what is relevant, convenient and practical in UEFI with Rust and how the APIs should be designed, as std and the ecosystem grow closer together

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use with nightly uefi-std
2 participants