Open smmalis37 opened 1 year ago
CC @russell-islam
@smmalis37 I've gone through regs.rs
and added those where I can. However bindings.rs
is generated by bindgen. I'm a bit hesitant to modify it by hand and only to be overwritten later.
This looks interesting https://github.com/rust-lang/rust-bindgen/pull/2059 but there is no CLI option exposed in bindgen.
For generating bindings we need to have the support to derive these fields. We can not manually do it every time.
It looks like the issue on bindgen's side is progressing. I'm going to leave this issue open for now.
It would be very helpful, and allow us to reduce the amount of unsafe code we have, if more structs could derive AsBytes and FromBytes, specifically those in https://github.com/rust-vmm/mshv/blob/main/mshv-bindings/src/bindings.rs and https://github.com/rust-vmm/mshv/blob/main/mshv-bindings/src/regs.rs.