https://github.com/48cf/limine-zig
A Zig library for handling Limine boot protocol structures.
https://github.com/48cf/limine-zig
Last synced: about 1 year ago
JSON representation
A Zig library for handling Limine boot protocol structures.
- Host: GitHub
- URL: https://github.com/48cf/limine-zig
- Owner: 48cf
- License: bsd-2-clause
- Created: 2022-07-31T01:04:38.000Z (almost 4 years ago)
- Default Branch: trunk
- Last Pushed: 2025-03-12T22:53:50.000Z (over 1 year ago)
- Last Synced: 2025-04-14T22:05:07.012Z (about 1 year ago)
- Language: Zig
- Homepage:
- Size: 38.1 KB
- Stars: 20
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# limine-zig
Zig bindings for the [The Limine Boot Protocol](https://github.com/limine-bootloader/limine/blob/trunk/PROTOCOL.md).
To use this library, add it to your `build.zig.zon` file manually or use `zig fetch`:
```sh
zig fetch --save git+https://github.com/48cf/limine-zig#trunk
```
Then, import the library in your `build.zig`:
```zig
const limine_zig = b.dependency("limine_zig", .{
// The API revision of the Limine Boot Protocol to use, if not provided
// it defaults to 0. Newer revisions may change the behavior of the bootloader.
.api_revision = 3,
// Whether to allow using deprecated features of the Limine Boot Protocol.
// If set to false, the build will fail if deprecated features are used.
.allow_deprecated = false,
// Whether to expose pointers in the API. When set to true, any field
// that is a pointer will be exposed as a raw address instead.
.no_pointers = false,
});
// Get the Limine module
const limine_module = limine_zig.module("limine");
// Import the Limine module into the kernel
kernel.addImport("limine", limine_module);
```
You can find an example kernel using this library [here](https://github.com/48cf/limine-zig-template).
To use this library, you need at least Zig 0.14.0.