File tree Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Expand file tree Collapse file tree 2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ description = """
44Library with type definitions and parsing functions for Multiboot2 headers.
55This library is `no_std` and can be used in bootloaders.
66"""
7- version = " 0.1.0 "
7+ version = " 0.1.1 "
88authors = [
99 " Philipp Schuster <phip1611@gmail.com>"
1010]
@@ -27,6 +27,12 @@ homepage = "https://github.com/rust-osdev/multiboot2-header"
2727repository = " https://github.com/rust-osdev/multiboot2"
2828documentation = " https://docs.rs/multiboot2-header"
2929
30+ [features ]
31+ # by default, builder is included
32+ default = [" builder" ]
33+ std = []
34+ builder = [" std" ]
35+
3036[dependencies ]
3137# used for MBI tags
32- multiboot2 = " 0.12 .2"
38+ multiboot2 = " 0.13 .2"
Original file line number Diff line number Diff line change @@ -15,6 +15,18 @@ What this library is good for:
1515What 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.
22+
23+ ``` toml
24+ # without `builder`-feature (and without `alloc`-crate)
25+ multiboot2-header = { version = " <latest>" , default-features = false }
26+ # else (requires `alloc`-crate)
27+ multiboot2-header = " <latest>"
28+ ```
29+
1830## Example 1: Builder + Parse
1931``` rust
2032use multiboot2_header :: builder :: Multiboot2HeaderBuilder ;
You can’t perform that action at this time.
0 commit comments