-
-
Notifications
You must be signed in to change notification settings - Fork 804
Update Rust nightly version + Expose virtual-function-elimination #3072
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Alistair Francis <[email protected]>
Signed-off-by: Alistair Francis <[email protected]>
0de7066 to
6bcb084
Compare
By enabling virtual-function-elimination we can reduce the size of the
final binaries. Here is a before and after for OpenTitan:
Before:
Binary: 139K
.text: 22818
After
Binary: 136K
.text: 21d0c
As virtual-function-elimination is still experimental let's not enable
it by default, but leave it as an option. This allows people to test it
and help contribute improvements and bug reports back to the Rust
compiler.
Signed-off-by: Alistair Francis <[email protected]>
6bcb084 to
cf60608
Compare
|
At a glance the netlify failure appears to be a real rustdoc error: https://app.netlify.com/sites/docs-tockosorg/deploys/62c376c0f1e20d0008fd820c |
Signed-off-by: Alistair Francis <[email protected]>
|
Fixed the build failures |
| // available. | ||
| /// Statically validate the size and offsets of the fields defined | ||
| /// within the register struct through the [`register_structs!`] | ||
| /// within the register struct through the `register_structs!()` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took a stab at keeping the rustdoc link and failed to get it to build, so I am fine with removing it
|
bors r+ |
`tock-registers` now supports stable Rust! There is a small breaking change, documented below, required to support Rust 2021 edition. Most of the remaining changes are improvements to the internal self-testing infrastructure and documentation. There are also some additions to `FieldValue` to improve ergonomics. **Breaking Changes** - #2842: tock-registers: rename TryFromValue::try_from to try_from_value - #2833: Update to Rust 2021 edition Other Changes - #3126: [trivial] tock-registers: mark two methods as `const` - #3088: tock_registers/test_fields: respect struct size padding w/ alignment - #3072: Update Rust nightly version + Expose virtual-function-elimination - libraries/tock-register-interface: Fixup register_structs documentation - #2988: Remove const_fn_trait_bound feature and update nightly (Mar 2022) - #3014: tock-registers: Implement From field enum value type for FieldValue - #3013: tock-register-interface: Provide none method for FieldValue type - #2916: tock-register-interface: improve read_as_enum documentation - #2922: tock-register-interface: replace register tests by const assertions
`tock-registers` now supports stable Rust! There is a small breaking change, documented below, required to support Rust 2021 edition. Most of the remaining changes are improvements to the internal self-testing infrastructure and documentation. There are also some additions to `FieldValue` to improve ergonomics. **Breaking Changes** - #2842: tock-registers: rename TryFromValue::try_from to try_from_value - #2833: Update to Rust 2021 edition Other Changes - #3126: [trivial] tock-registers: mark two methods as `const` - #3088: tock_registers/test_fields: respect struct size padding w/ alignment - #3072: Update Rust nightly version + Expose virtual-function-elimination - libraries/tock-register-interface: Fixup register_structs documentation - #2988: Remove const_fn_trait_bound feature and update nightly (Mar 2022) - #3014: tock-registers: Implement From field enum value type for FieldValue - #3013: tock-register-interface: Provide none method for FieldValue type - #2916: tock-register-interface: improve read_as_enum documentation - #2922: tock-register-interface: replace register tests by const assertions
`tock-registers` now supports stable Rust! There is a small breaking change, documented below, required to support Rust 2021 edition. Most of the remaining changes are improvements to the internal self-testing infrastructure and documentation. There are also some additions to `FieldValue` to improve ergonomics. **Breaking Changes** - #2842: tock-registers: rename TryFromValue::try_from to try_from_value - #2838: Update to Rust 2021 edition Other Changes - #3126: [trivial] tock-registers: mark two methods as `const` - #3088: tock_registers/test_fields: respect struct size padding w/ alignment - #3072: Update Rust nightly version + Expose virtual-function-elimination - libraries/tock-register-interface: Fixup register_structs documentation - #2988: Remove const_fn_trait_bound feature and update nightly (Mar 2022) - #3014: tock-registers: Implement From field enum value type for FieldValue - #3013: tock-register-interface: Provide none method for FieldValue type - #2916: tock-register-interface: improve read_as_enum documentation - #2922: tock-register-interface: replace register tests by const assertions
3151: tock-registers: release v0.8 r=lschuermann a=ppannuto ### Pull Request Overview Prepare a v0.8 release of tock-registers. Fixes #2982. --- `tock-registers` now supports stable Rust! There is a small breaking change, documented below, required to support Rust 2021 edition. Most of the remaining changes are improvements to the internal self-testing infrastructure and documentation. There are also some additions to `FieldValue` to improve ergonomics. **Breaking Changes** - #2842: tock-registers: rename TryFromValue::try_from to try_from_value - #2838: Update to Rust 2021 edition Other Changes - #3126: [trivial] tock-registers: mark two methods as `const` - #3088: tock_registers/test_fields: respect struct size padding w/ alignment - #3072: Update Rust nightly version + Expose virtual-function-elimination - libraries/tock-register-interface: Fixup register_structs documentation - #2988: Remove const_fn_trait_bound feature and update nightly (Mar 2022) - #3014: tock-registers: Implement From field enum value type for FieldValue - #3013: tock-register-interface: Provide none method for FieldValue type - #2916: tock-register-interface: improve read_as_enum documentation - #2922: tock-register-interface: replace register tests by const assertions ### Testing Strategy N/A ### TODO or Help Wanted N/A ### Documentation Updated - [x] Updated the relevant files in `/docs`, or no updates are required. ### Formatting - [ ] Ran `make prepush`. Co-authored-by: Pat Pannuto <[email protected]>
Pull Request Overview
By enabling virtual-function-elimination we can reduce the size of the
final binaries. Here is a before and after for OpenTitan:
Before:
Binary: 139K
.text: 22818
After
Binary: 136K
.text: 21d0c
As virtual-function-elimination is still experimental let's not enable
it by default, but leave it as an option. This allows people to test it
and help contribute improvements and bug reports back to the Rust
compiler.
Testing Strategy
CI
TODO or Help Wanted
N/A
Documentation Updated
/docs, or no updates are required.Formatting
make prepush.