-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
std
feature, allow crate to work in #![no_std] mode
Disabling the `std` feature (by setting `default-features = false` for this crate in the Cargo.toml of something requiring it) will enable the crate to work without the standard library, assuming the presence of the `alloc` crate and a working global allocator. We've explicitly imported the individual `alloc` items required by this crate, rather than using `#![feature(alloc_prelude)]` as `alloc_prelude` requires Rust nightly, and doing it that way would be a breaking change to the MSRV. Tested with Cargo/rustc 1.53.0
- Loading branch information
Showing
3 changed files
with
22 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,3 +12,7 @@ categories = [ | |
"command-line-interface", | ||
"parser-implementations" | ||
] | ||
|
||
[features] | ||
std = [] | ||
default = ["std"] |
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