25 releases (14 stable)

5.1.0 Oct 13, 2024
5.0.0 Sep 13, 2023
4.1.1 Aug 1, 2022
4.1.0 Nov 4, 2021
0.1.0 May 3, 2018

#34 in Hardware support

Download history 3290/week @ 2024-07-18 3393/week @ 2024-07-25 2743/week @ 2024-08-01 3605/week @ 2024-08-08 2100/week @ 2024-08-15 2734/week @ 2024-08-22 1975/week @ 2024-08-29 1435/week @ 2024-09-05 2410/week @ 2024-09-12 3604/week @ 2024-09-19 3486/week @ 2024-09-26 3732/week @ 2024-10-03 4218/week @ 2024-10-10 3728/week @ 2024-10-17 4400/week @ 2024-10-24 2676/week @ 2024-10-31

15,564 downloads per month
Used in 6 crates (5 directly)

MIT/Apache

130KB
2.5K SLoC

Acpi

Build Status Version Version Version

Documentation (rsdp)

Documentation (acpi)

Documentation (aml)

A library to parse ACPI tables and AML, written in pure Rust. Designed to be easy to use from Rust bootloaders and kernels. The library is split into three crates:

  • rsdp parses the RSDP and can locate it on BIOS platforms. It does not depend on alloc, so is suitable to use from bootloaders without heap alloctors. All of its functionality is reexported by acpi.
  • acpi parses the static tables (useful but not feature-complete). It can be used from environments that have allocators, and ones that don't (but with reduced functionality).
  • aml parses the AML tables (can be useful, far from feature-complete).

There is also the acpi-dumper utility to easily dump a platform's ACPI tables (this currently only works on Linux).

Contributing

Contributions are more than welcome! You can:

  • Write code - the ACPI spec is huge and there are bound to be things we don't support yet!
  • Improve our documentation!
  • Use the crates within your kernel and file bug reports and feature requests!

Useful resources for contributing are:

You can run the AML test suite with cargo run --bin aml_tester -- -p tests. You can run fuzz the AML parser with cd aml && cargo fuzz run fuzz_target_1 (you may need to cargo install cargo-fuzz).

Licence

This project is dual-licenced under:

Unless you explicitly state otherwise, any contribution submitted for inclusion in this work by you, as defined in the Apache-2.0 licence, shall be dual licenced as above, without additional terms or conditions.

Dependencies

~220KB