Update rust-cpuid to support libcpuid 0.4.0
Hi,
This commit updates rust-cpuid to support libcpuid
version 0.4.0, mostly updating the structures and
their allocation. It includes:
- Update
MAX_INTELFN4_LEVELtousize 8 - Update
cpu_raw_data_twith new intel fields - Update
cpu_id_tto include new fields with sgx support - Update
CPUFeatureto include new features - Switch back to using
Default::default()instead ofmem::uninitialized()
Regarding that last point, I'm not extremely familiar with undefined behavior (still fighting my way through the rustonomicon), thus I changed back to using default() instead of mem::uninitialized(). Looking at the documentation it seems that using mem::uninitialized() is considered harmful. But I can update the PR and change this back if this is the preferred way to deal with initializing the structs.
Not sure if this is going to pass through the CI but let's see! :)
Thanks for the lib!
Signed-off-by: Alexandre Beslic [email protected]
Any updates on this PR?
@zyluo Until this gets reviewed and merged into this repository, I have a working fork with this change merged in: https://github.com/MantissaLabs/rust-cpuid