6 releases (stable)

2.0.2 Feb 9, 2022
2.0.0 Nov 22, 2021
1.0.0 Sep 21, 2021
0.1.1 Aug 20, 2020
0.1.0 Aug 20, 2020

#7 in #semantics

Download history 300/week @ 2023-12-18 113/week @ 2023-12-25 79/week @ 2024-01-01 99/week @ 2024-01-08 287/week @ 2024-01-15 87/week @ 2024-01-22 240/week @ 2024-01-29 174/week @ 2024-02-05 91/week @ 2024-02-12 284/week @ 2024-02-19 693/week @ 2024-02-26 209/week @ 2024-03-04 187/week @ 2024-03-11 106/week @ 2024-03-18 124/week @ 2024-03-25 210/week @ 2024-04-01

644 downloads per month
Used in 4 crates (3 directly)

Apache-2.0

13KB
265 lines

Workflow Status Average time to resolve an issue Percentage of issues still open Maintenance

xsave

This crate contains a practical implementation of the x86 xsave semantics.

We do not intend to support all possible variations of the instructures, nor do we intend to calculate the size of the xsave area dynamically. Instead, our practical strategy will overallocate the size of the xsave area so that we get a constant size for the struct. This allows for substantially easier embedding in other contexts.

For example, clearing the extended CPU state is a simple:

use xsave::XSave;

XSave::default().load();

Likewise, you can save and restore the extended CPU state like this:

use xsave::XSave;

let mut xsave = XSave::default();
xsave.save();
xsave.load();

License: Apache-2.0

Dependencies

~3.5MB
~75K SLoC