#x86 #size

xsave

An implementation of x86 XSave semantics

6 releases (stable)

Uses new Rust 2021

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
Download history 2245/week @ 2022-01-26 2358/week @ 2022-02-02 4630/week @ 2022-02-09 9179/week @ 2022-02-16 3748/week @ 2022-02-23 3666/week @ 2022-03-02 8906/week @ 2022-03-09 5175/week @ 2022-03-16 7481/week @ 2022-03-23 10716/week @ 2022-03-30 11189/week @ 2022-04-06 4960/week @ 2022-04-13 8218/week @ 2022-04-20 7198/week @ 2022-04-27 5118/week @ 2022-05-04 5152/week @ 2022-05-11

26,777 downloads per month
Used in 5 crates (3 directly)

Apache-2.0

12KB
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

~0.6–1.2MB
~28K SLoC