Skip to content

prepare release multiboot2-header-v0.3.2 #197

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@ updates:
- package-ecosystem: cargo
directory: "/"
schedule:
interval: daily
interval: weekly
open-pull-requests-limit: 10
ignore:
- dependency-name: "*"
update-types: [ "version-update:semver-patch" ]
- package-ecosystem: cargo
directory: "/integration-test/bins"
schedule:
interval: daily
interval: weekly
open-pull-requests-limit: 10
ignore:
- dependency-name: "*"
update-types: [ "version-update:semver-patch" ]
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
interval: monthly
open-pull-requests-limit: 10
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 16 additions & 16 deletions integration-test/bins/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions multiboot2-header/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = """
Library with type definitions and parsing functions for Multiboot2 headers.
This library is `no_std` and can be used in bootloaders.
"""
version = "0.3.1"
version = "0.3.2"
authors = [
"Philipp Schuster <[email protected]>"
]
Expand Down Expand Up @@ -46,7 +46,7 @@ derive_more.workspace = true
# Not yet used.
# log.workspace = true

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

[package.metadata.docs.rs]
Expand Down
16 changes: 14 additions & 2 deletions multiboot2-header/Changelog.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
# CHANGELOG for crate `multiboot2-header`

## 0.4.0 (2023-09-xx)
- **BREAKING** MSRV is 1.68.0
## 0.3.2 (2023-11-30)

- **BREAKING** bumped `multiboot2` dependency to `v0.19.0`
- the `multiboot2` dependency doesn't pull in the `multiboot2/builder` feature
anymore
- doc update

## 0.3.1 (2023-06-28)

- doc update

## 0.3.0 (2023-06-23)

- **BREAKING** MSRV is 1.68.0
- **BREAKING** renamed the `std` feature to `alloc`
- **BREAKING** bumped `multiboot2` dependency to `v0.16.0`
Expand All @@ -17,18 +25,22 @@
- implement `core::error::Error` for `LoadError`

## 0.2.0 (2022-05-03)

- **BREAKING** renamed `EntryHeaderTag` to `EntryAddressHeaderTag`
- **BREAKING** some paths changed from `multiboot2_header::header` to `multiboot2_header::builder`
-> thus, import paths are much more logically now
- internal code improvements

## 0.1.1 (2022-05-02)

- fixed a bug that prevented the usage of the crate in `no_std` environments
- added a new default `builder`-feature to Cargo which requires the `alloc`-crate
(this feature can be disabled which will also remove the dependency to the `alloc` crate)

## 0.1.0 (2021-10-08)

- initial release

## 0.0.0

Empty release to save the name on crates.io
25 changes: 14 additions & 11 deletions multiboot2-header/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@
[![crates.io](https://img.shields.io/crates/v/multiboot2-header.svg)](https://crates.io/crates/multiboot2-header)
[![docs](https://docs.rs/multiboot2-header/badge.svg)](https://docs.rs/multiboot2-header/)

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

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

What this library is not optimal for:
- compiling a Multiboot2 header statically into an object file using only Rust code

## Features and `no_std` Compatibility

This library is always `no_std` without `alloc`. However, the default `builder`-
feature requires the `alloc`-crate and an `#[global_allocator]` to be available.
You need the `builder` only if you want to construct new headers at runtime.
For parsing, this is not relevant, and you can deactivate the default feature.
For parsing, the feature is not relevant, and you can deactivate it.

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

## Example 1: Builder + Parse

```rust
use multiboot2_header::builder::{InformationRequestHeaderTagBuilder, Multiboot2HeaderBuilder};
use multiboot2_header::{HeaderTagFlag, HeaderTagISA, MbiTagType, RelocatableHeaderTag, RelocatableHeaderTagPreference, Multiboot2Header};
Expand Down Expand Up @@ -58,17 +59,19 @@ fn main() {
```

## Example 2: Multiboot2 header as static data in Rust file

You can use the builder, construct a Multiboot2 header, write it to a file and include it like this:
```
#[used]
#[no_mangle]
#[link_section = ".text.multiboot2_header"]
static MULTIBOOT2_HDR: &[u8; 64] = include_bytes!("mb2_hdr_dump.bin");
static MULTIBOOT2_HDR: [u8; 64] = *include_bytes!("mb2_hdr_dump.bin");
```
You may need a special linker script to place this in a LOAD segment with a file offset with less than 32768 bytes.
See specification.
You may need a special linker script to place this symbol in the first 32768
bytes of the ELF. See Multiboot2 specification.

## MSRV

The MSRV is 1.69.0 stable.

## License & Contribution
Expand Down
7 changes: 5 additions & 2 deletions multiboot2-header/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
//! Library with type definitions and parsing functions for Multiboot2 headers.
//! This library is `no_std` and can be used in bootloaders.
//! Rust library with type definitions and parsing functions for Multiboot2
//! headers, as well as a builder to build them at runtime. This library is
//! `no_std` and can be used in bootloaders.
//!
//! # Example
//!
//! ```rust
//! use multiboot2_header::builder::{InformationRequestHeaderTagBuilder, HeaderBuilder};
//! use multiboot2_header::{HeaderTagFlag, HeaderTagISA, MbiTagType, RelocatableHeaderTag, RelocatableHeaderTagPreference, Multiboot2Header};
Expand Down Expand Up @@ -31,6 +33,7 @@
//! ```
//!
//! ## MSRV
//!
//! The MSRV is 1.69.0 stable.

#![no_std]
Expand Down