Skip to content

Commit 05875b0

Browse files
authored
Merge pull request #197 from rust-osdev/multiboot2-hdr-dev
prepare release multiboot2-header-v0.3.2
2 parents 3a03204 + 75b2f7d commit 05875b0

File tree

7 files changed

+61
-43
lines changed

7 files changed

+61
-43
lines changed

.github/dependabot.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@ updates:
33
- package-ecosystem: cargo
44
directory: "/"
55
schedule:
6-
interval: daily
6+
interval: weekly
77
open-pull-requests-limit: 10
88
ignore:
99
- dependency-name: "*"
1010
update-types: [ "version-update:semver-patch" ]
1111
- package-ecosystem: cargo
1212
directory: "/integration-test/bins"
1313
schedule:
14-
interval: daily
14+
interval: weekly
1515
open-pull-requests-limit: 10
1616
ignore:
1717
- dependency-name: "*"
1818
update-types: [ "version-update:semver-patch" ]
1919
- package-ecosystem: github-actions
2020
directory: "/"
2121
schedule:
22-
interval: daily
22+
interval: monthly
2323
open-pull-requests-limit: 10

Cargo.lock

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

integration-test/bins/Cargo.lock

+16-16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

multiboot2-header/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description = """
44
Library with type definitions and parsing functions for Multiboot2 headers.
55
This library is `no_std` and can be used in bootloaders.
66
"""
7-
version = "0.3.1"
7+
version = "0.3.2"
88
authors = [
99
"Philipp Schuster <[email protected]>"
1010
]
@@ -46,7 +46,7 @@ derive_more.workspace = true
4646
# Not yet used.
4747
# log.workspace = true
4848

49-
# used for MBI tags
49+
# Used for MBI tags.
5050
multiboot2 = { version = "0.19.0", default-features = false }
5151

5252
[package.metadata.docs.rs]

multiboot2-header/Changelog.md

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
# CHANGELOG for crate `multiboot2-header`
22

3-
## 0.4.0 (2023-09-xx)
4-
- **BREAKING** MSRV is 1.68.0
3+
## 0.3.2 (2023-11-30)
4+
55
- **BREAKING** bumped `multiboot2` dependency to `v0.19.0`
6+
- the `multiboot2` dependency doesn't pull in the `multiboot2/builder` feature
7+
anymore
8+
- doc update
9+
10+
## 0.3.1 (2023-06-28)
11+
12+
- doc update
613

714
## 0.3.0 (2023-06-23)
15+
816
- **BREAKING** MSRV is 1.68.0
917
- **BREAKING** renamed the `std` feature to `alloc`
1018
- **BREAKING** bumped `multiboot2` dependency to `v0.16.0`
@@ -17,18 +25,22 @@
1725
- implement `core::error::Error` for `LoadError`
1826

1927
## 0.2.0 (2022-05-03)
28+
2029
- **BREAKING** renamed `EntryHeaderTag` to `EntryAddressHeaderTag`
2130
- **BREAKING** some paths changed from `multiboot2_header::header` to `multiboot2_header::builder`
2231
-> thus, import paths are much more logically now
2332
- internal code improvements
2433

2534
## 0.1.1 (2022-05-02)
35+
2636
- fixed a bug that prevented the usage of the crate in `no_std` environments
2737
- added a new default `builder`-feature to Cargo which requires the `alloc`-crate
2838
(this feature can be disabled which will also remove the dependency to the `alloc` crate)
2939

3040
## 0.1.0 (2021-10-08)
41+
3142
- initial release
3243

3344
## 0.0.0
45+
3446
Empty release to save the name on crates.io

multiboot2-header/README.md

+14-11
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@
33
[![crates.io](https://img.shields.io/crates/v/multiboot2-header.svg)](https://crates.io/crates/multiboot2-header)
44
[![docs](https://docs.rs/multiboot2-header/badge.svg)](https://docs.rs/multiboot2-header/)
55

6-
Rust library with type definitions and parsing functions for Multiboot2 headers.
7-
This library is `no_std` and can be used in bootloaders.
6+
Rust library with type definitions and parsing functions for Multiboot2 headers,
7+
as well as a builder to build them at runtime. This library is `no_std` and can
8+
be used in bootloaders.
89

910
What this library is good for:
10-
- writing a small binary which writes you a valid Multiboot2 header
11-
into a file (such as `header.bin`)
11+
- construct a Multiboot2 header at runtime (constructing one at build-time with
12+
macros is not done yet, contributions are welcome!)
13+
- write a Multiboot2-bootloader that parses a Multiboot2-header
1214
- understanding Multiboot2 headers better
1315
- analyze Multiboot2 headers at runtime
1416

15-
What this library is not optimal for:
16-
- compiling a Multiboot2 header statically into an object file using only Rust code
17-
1817
## Features and `no_std` Compatibility
18+
1919
This library is always `no_std` without `alloc`. However, the default `builder`-
2020
feature requires the `alloc`-crate and an `#[global_allocator]` to be available.
2121
You need the `builder` only if you want to construct new headers at runtime.
22-
For parsing, this is not relevant, and you can deactivate the default feature.
22+
For parsing, the feature is not relevant, and you can deactivate it.
2323

2424
```toml
2525
# without `builder`-feature (and without `alloc`-crate)
@@ -29,6 +29,7 @@ multiboot2-header = "<latest>"
2929
```
3030

3131
## Example 1: Builder + Parse
32+
3233
```rust
3334
use multiboot2_header::builder::{InformationRequestHeaderTagBuilder, Multiboot2HeaderBuilder};
3435
use multiboot2_header::{HeaderTagFlag, HeaderTagISA, MbiTagType, RelocatableHeaderTag, RelocatableHeaderTagPreference, Multiboot2Header};
@@ -58,17 +59,19 @@ fn main() {
5859
```
5960

6061
## Example 2: Multiboot2 header as static data in Rust file
62+
6163
You can use the builder, construct a Multiboot2 header, write it to a file and include it like this:
6264
```
6365
#[used]
6466
#[no_mangle]
6567
#[link_section = ".text.multiboot2_header"]
66-
static MULTIBOOT2_HDR: &[u8; 64] = include_bytes!("mb2_hdr_dump.bin");
68+
static MULTIBOOT2_HDR: [u8; 64] = *include_bytes!("mb2_hdr_dump.bin");
6769
```
68-
You may need a special linker script to place this in a LOAD segment with a file offset with less than 32768 bytes.
69-
See specification.
70+
You may need a special linker script to place this symbol in the first 32768
71+
bytes of the ELF. See Multiboot2 specification.
7072

7173
## MSRV
74+
7275
The MSRV is 1.69.0 stable.
7376

7477
## License & Contribution

multiboot2-header/src/lib.rs

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
//! Library with type definitions and parsing functions for Multiboot2 headers.
2-
//! This library is `no_std` and can be used in bootloaders.
1+
//! Rust library with type definitions and parsing functions for Multiboot2
2+
//! headers, as well as a builder to build them at runtime. This library is
3+
//! `no_std` and can be used in bootloaders.
34
//!
45
//! # Example
6+
//!
57
//! ```rust
68
//! use multiboot2_header::builder::{InformationRequestHeaderTagBuilder, HeaderBuilder};
79
//! use multiboot2_header::{HeaderTagFlag, HeaderTagISA, MbiTagType, RelocatableHeaderTag, RelocatableHeaderTagPreference, Multiboot2Header};
@@ -31,6 +33,7 @@
3133
//! ```
3234
//!
3335
//! ## MSRV
36+
//!
3437
//! The MSRV is 1.69.0 stable.
3538
3639
#![no_std]

0 commit comments

Comments
 (0)