Skip to content

Commit

Permalink
Full rewrite of the crate (#23)
Browse files Browse the repository at this point in the history
* feat: 👷 Add clippy and rustfmt to CI jobs

* feat: ✨ Complete rewrite

* fix: 🍻 Replace `Rdsp` with `Rsdp`

I accidentally wrote `Rdsp` instead of `Rsdp`, in multiple places. Oops!

* docs: ✨ Add docs for the root crate

* fix: 🚑 Use `i64` instead of `u64` in `BootTimeResponse`

Additionally, export it as a `Duration`

* fix: 🎨 Apply consistent formatting (attributes after doc comments)

* fix: 🚑 Add `#[repr(C)]` to `memory_map::Entry`

* fix: 🚑 Fix return type of `MemoryMapResponse::entries` and add `entries_mut`

* feat: 🎨 Remove revision parameter from `new`

`new` no longer takes a parameter.

* feat: 🎨 Replace `InternalModules` with a regular old slice

`InternalModules` no longer exists. Instead, a simple slice is used.

* fix: 🐛 Feature gate `Ipv4Addr` until it's actually released

Currently, it's only stable on 1.77.

* docs: 🐛 Add docs for the `X2APIC` flag.

* fix: 🐛 Override the default non-nightly toolchain

* fix: 🐛 Correct `uuid` transformations

* ci: 🔥 Remove `build` step

Clippy already builds

* ci: ✨ Run clippy for all supported architectures

* style: 🎨 Move attributes after doc comments

* fix: 🐛 Replace `u32` with `Option<NonZeroU32>` for MBR disk ID

* refactor: 🔥 Return `&[u8]` instead of `Result<&str, &[u8]>`

A user can attempt the conversion themself
  • Loading branch information
lylythechosenone authored Jan 27, 2024
1 parent fd967c9 commit a0da169
Show file tree
Hide file tree
Showing 19 changed files with 1,996 additions and 922 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@nightly
with:
profile: minimal
toolchain: nightly
targets: x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu, riscv64gc-unknown-linux-gnu
components: rustfmt, clippy
- name: Rust Version
run: rustup --version && rustc --version
- name: Build the limine-rs crate
run: cargo build --verbose
- name: Run clippy x86_64
run: cargo clippy --verbose --target x86_64-unknown-linux-gnu --all-features -- -D warnings
- name: Run clippy aarch64
run: cargo clippy --verbose --target aarch64-unknown-linux-gnu --all-features -- -D warnings
- name: Run clippy riscv64
run: cargo clippy --verbose --target riscv64gc-unknown-linux-gnu --all-features -- -D warnings
- name: Reformat code
uses: mbrobbel/rustfmt-check@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 0.2.0 **BREAKING CHANGES**
* Complete rewrite.
* Removed limine-proc.
* Added support for platform-specific requests and responses.
* Fixed safety concerns.
* Simplified the API heavily.

# 0.1.12
* Add the `BaseRevision` tag.

Expand Down
57 changes: 9 additions & 48 deletions Cargo.lock

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

22 changes: 12 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
[package]
name = "limine"
description = "Rust crate for parsing the limine boot protocol structures"
version = "0.1.12"
version = "0.2.0"
edition = "2021"
authors = ["Anhad Singh <[email protected]>"]
license = "MIT/Apache-2.0"
authors = [
"Anhad Singh <[email protected]>",
"Lysander Mealy <[email protected]>",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/limine-bootloader/limine-rs"

readme = "README.md"
categories = ["no-std"]

[features]
requests-section = ["limine-proc"]
into-uuid = ["uuid"]
default = []

[dependencies]
limine-proc = { optional = true, version = "0.1.0" }
uuid = { optional = true, version = "1.1.2", default-features = false }
bitflags = "2"
uuid = { version = "1", default-features = false, optional = true }

[features]
uuid = ["dep:uuid"]
ipaddr = []
2 changes: 1 addition & 1 deletion LICENSE-APACHE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2021 Anhad Singh
Copyright 2021 Anhad Singh, 2024 Lysander Mealy

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 Anhad Singh
Copyright (c) 2021 Anhad Singh, 2024 Lysander Mealy

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
46 changes: 0 additions & 46 deletions limine-proc/Cargo.lock

This file was deleted.

19 changes: 0 additions & 19 deletions limine-proc/Cargo.toml

This file was deleted.

31 changes: 0 additions & 31 deletions limine-proc/src/lib.rs

This file was deleted.

2 changes: 0 additions & 2 deletions rust-toolchain

This file was deleted.

Loading

0 comments on commit a0da169

Please sign in to comment.