Closed mkroening closed 5 months ago
I have also slightly refactored the macro implementation (parsing into one struct instead of many) and have made the macro copy the docs from struct to trait.
Thanks a lot!
Should I create a new release or do you have other changes planned that we should wait for?
Should I create a new release or do you have other changes planned that we should wait for?
I just opened https://github.com/rust-osdev/volatile/pull/51 and https://github.com/rust-osdev/volatile/pull/52, but they are not urgent. Apart from that, this should be good to go. Thanks a lot! :)
This PR adds a new proc-macro that adds additional functions to
VolatilePtr
for user-defined types, with support for access-limitations.This means this code
will derive this code:
My motivation for this is that I found
map_field!
not ideal to use when your field is nested (map_field!(one.two.three)
does not work) and it does not chain well (cannot be nested). Additionally, this proc-macro allows you to properly specify access restrictions for your fields.I thought this would be a nice fit for this repository rather than publishing the crate independently, for visibility, discoverability, and maintenance. What are your thoughts on this?
This PR depends on https://github.com/rust-osdev/volatile/pull/47