-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Replace imports from std:: with core:: * Move 'clap' as a dependency for the 'std' feature Introduce a new `std` feature that can be optionally disabled for nostd support. The new feature is on by default, so the default behaviour of this crate remains unchanged. Note that building with `nostd` does not yet work. * Add a prelude to import common features from core Some components like `TryInto`, `String, etc are not visible by default with nostd (since they are exposed via std's prelude). Create a crate-local prelude to expose all these. * Use a custom error type Drops the dependency on std::io::Error. This finally enables building with `nostd`, which can be tested via: cargo build --target x86_64-unknown-uefi --no-default-features --lib Note that trying to build the binary (e.g.: `main.rs`) with nostd is not supported. Co-Authored-By: Isaac Marovitz <[email protected]> --------- Co-authored-by: Isaac Marovitz <[email protected]>
- Loading branch information
1 parent
3412036
commit 9c88a9e
Showing
8 changed files
with
87 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
pub use core::prelude::v1::*; | ||
|
||
extern crate alloc; | ||
pub use alloc::string::String; | ||
pub use alloc::vec::Vec; | ||
pub use core::{write, writeln}; | ||
pub use core::convert::TryInto; | ||
pub use core::unreachable; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters