Skip to content

Commit 881e4c9

Browse files
committed
rename crate feature std to alloc
1 parent 714905b commit 881e4c9

File tree

5 files changed

+17
-10
lines changed

5 files changed

+17
-10
lines changed

multiboot2-header/Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,9 @@ repository = "https://github.com/rust-osdev/multiboot2"
2828
documentation = "https://docs.rs/multiboot2-header"
2929

3030
[features]
31-
# by default, builder is included
3231
default = ["builder"]
33-
std = []
34-
builder = ["std"]
32+
alloc = []
33+
builder = ["alloc"]
3534

3635
[dependencies]
3736
# used for MBI tags

multiboot2-header/Changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## Unreleased
44
- MSRV is 1.56.1
5+
- renamed the `std` feature to `alloc`
56

67
## v0.2.0 (2022-05-03)
78
- **BREAKING** renamed `EntryHeaderTag` to `EntryAddressHeaderTag`

multiboot2-header/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ What this library is good for:
1515
What this library is not optimal for:
1616
- compiling a Multiboot2 header statically into an object file using only Rust code
1717

18-
## Features and Usage in `no_std`
19-
This library is always `no_std`. However, the `builder`-feature requires the `alloc`-crate
20-
to be available. You need the `builder` only if you want to construct new headers. For parsing,
21-
this is not relevant.
18+
## Features and `no_std` Compatibility
19+
This library is always `no_std`. However, the default `builder`-feature requires
20+
the `alloc`-crate to be available. You need the `builder` only if you want to
21+
construct new headers at run time. For parsing, this is not relevant, and you
22+
can deactivate the default feature.
2223

2324
```toml
2425
# without `builder`-feature (and without `alloc`-crate)

multiboot2/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ keywords = [
2323
"Multiboot2",
2424
"kernel",
2525
"boot",
26+
"bootloader",
2627
]
2728
# without this, sometimes crates.io doesn't show the preview of the README
2829
# I expeciended this multiple times in the past
@@ -32,10 +33,9 @@ repository = "https://github.com/rust-osdev/multiboot2"
3233
documentation = "https://docs.rs/multiboot2"
3334

3435
[features]
35-
# by default, builder is included
3636
default = ["builder"]
37-
std = []
38-
builder = ["std"]
37+
alloc = []
38+
builder = ["alloc"]
3939
# Nightly-only features that will eventually be stabilized.
4040
unstable = []
4141

multiboot2/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ used in a Multiboot2-kernel.
1010

1111
It follows the Multiboot 2.0 specification at https://www.gnu.org/software/grub/manual/multiboot2/multiboot.html and the ELF 64 specification at http://www.uclibc.org/docs/elf-64-gen.pdf.
1212

13+
## Features and `no_std` Compatibility
14+
This library is always `no_std`. However, the default `builder`-feature requires
15+
the `alloc`-crate to be available. You need the `builder` only if you want to
16+
construct new boot information structures at run time. For parsing, this is not
17+
relevant, and you can deactivate the default feature.
18+
1319
## Background: The Multiboot 2 Information Structure
1420
The Multiboot information structure looks like this:
1521

0 commit comments

Comments
 (0)