Skip to content

Conversation

@NathanRoyer
Copy link
Contributor

Hello! We are using these crates in our project (Theseus OS), and we would like to use uefi without the logger feature.
However, I discovered that the uefi-services crate forces us to have the logger feature enabled in uefi, as per its manifest.

Due to how the log crate is implemented, it is impossible to set a logger twice; because uefi-services sets the default one up (and disables it when boot services are exited), we can't set our own logger up.

This PR simply adds a logger feature to uefi-services, which propagates to the same feature in uefi. This allows us to use both crates without the built-in logger.

Copy link
Member

@nicholasbishop nicholasbishop left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, code changes LGTM. Could you also add an entry to the uefi-services section of CHANGELOG.md?

@NathanRoyer
Copy link
Contributor Author

Thanks for the PR, code changes LGTM. Could you also add an entry to the uefi-services section of CHANGELOG.md?

Absolutely

@nicholasbishop
Copy link
Member

Thanks!

@nicholasbishop nicholasbishop merged commit 89f6d6f into rust-osdev:main Nov 8, 2022
@phip1611
Copy link
Member

phip1611 commented Nov 8, 2022

However, I discovered that the uefi-services crate forces us to have the logger feature enabled in uefi, as per its manifest.

Not a general recommendation, but I've always seen uefi-services as a template. In almost all my projects, I never used it directly, as it was too limiting from time to time.

I used its code as a base to write my own global allocator and also the other stuff.

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.

3 participants