Browse Source

workspace: init multiboot2-common member

Philipp Schuster 8 months ago
parent
commit
eb7a6e79ea

+ 4 - 0
Cargo.lock

@@ -36,6 +36,10 @@ dependencies = [
  "uefi-raw",
 ]
 
+[[package]]
+name = "multiboot2-common"
+version = "0.1.0"
+
 [[package]]
 name = "multiboot2-header"
 version = "0.4.0"

+ 1 - 0
Cargo.toml

@@ -2,6 +2,7 @@
 resolver = "2"
 members = [
     "multiboot2",
+    "multiboot2-common",
     "multiboot2-header",
 ]
 exclude = [

+ 34 - 0
multiboot2-common/Cargo.toml

@@ -0,0 +1,34 @@
+[package]
+name = "multiboot2-common"
+description = """
+
+"""
+version = "0.1.0"
+authors = [
+    "Philipp Schuster <phip1611@gmail.com>"
+]
+license = "MIT/Apache-2.0"
+edition = "2021"
+categories = [
+    "no-std",
+    "parsing",
+]
+keywords = [
+    "Multiboot2",
+    "kernel",
+    "boot",
+    "bootloader",
+]
+readme = "README.md"
+homepage = "https://github.com/rust-osdev/multiboot2"
+repository = "https://github.com/rust-osdev/multiboot2"
+documentation = "https://docs.rs/multiboot2-common"
+#rust-version = "1.70"
+
+[features]
+
+
+[dependencies]
+
+[package.metadata.docs.rs]
+all-features = true

+ 5 - 0
multiboot2-common/Changelog.md

@@ -0,0 +1,5 @@
+# CHANGELOG for crate `multiboot2`
+
+## 0.1.0 (2024-08-20)
+
+Initial release.

+ 1 - 0
multiboot2-common/README.md

@@ -0,0 +1 @@
+# multiboot2-common

+ 32 - 0
multiboot2-common/src/lib.rs

@@ -0,0 +1,32 @@
+//! Common helpers for the `multiboot2` and `multiboot2-header` crates.
+//!
+//! The main objective here is to encapsulate the memory-sensible part of
+//! parsing and iterating Multiboot2 structures. This crate empowers
+//! `multiboot2` and `multiboot2-header` to use rusty types for the
+//! corresponding structures, such as non-trait DSTs (structs with a
+//! terminating `[u8]` field). The abstractions can be used for:
+//! - multiboot2:
+//!   - boot information structure (whole)
+//!   - boot information tags
+//! - multiboot2-header:
+//!   - header structure (whole)
+//!   - header tags
+//!
+//! Not meant as stable public API for others.
+
+#![no_std]
+// --- BEGIN STYLE CHECKS ---
+#![deny(
+    clippy::all,
+    clippy::cargo,
+    clippy::nursery,
+    clippy::must_use_candidate,
+    // clippy::restriction,
+    // clippy::pedantic
+)]
+// now allow a few rules which are denied by the above statement
+// --> They are either ridiculous, not necessary, or we can't fix them.
+#![deny(missing_docs)]
+#![deny(missing_debug_implementations)]
+#![deny(rustdoc::all)]
+// --- END STYLE CHECKS ---