Skip to content
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

Update to rust 1.84 #1956

Open
wants to merge 3 commits into
base: main-2.x
Choose a base branch
from
Open

Update to rust 1.84 #1956

wants to merge 3 commits into from

Conversation

ArthurHeymans
Copy link
Contributor

The reason for doing this is to be able to generate templates using rustcrypto which already supports ML-DSA87 (needs 1.81).
This PR fixes all the warnings and errors that the new toolchain brings.
Stack usage is increase by 4K with this newer version

swenson
swenson previously approved these changes Feb 10, 2025
Copy link
Contributor

@swenson swenson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, a couple of nits.

This will also unblock us using the Caliptra image builder in the MCU so we can do full integration tests with both emulators.

@@ -193,9 +193,15 @@ pub fn build_firmware_elfs_uncached<'a>(
.arg("target.'cfg(all())'.rustflags = [\"-Dwarnings\"]");
}

// cmd.env("RUSTFLAGS", "--emit asm");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we delete these parts that are commented out?

@@ -473,3 +456,20 @@ pub fn translate_addrmap(addrmap: systemrdl::ParentScope) -> Result<Vec<Register
}
Ok(blocks)
}

#[cfg(test)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can actually delete the usage of next_multiple_of now that we have the builtin method on integer types.

@mhatrevi mhatrevi added the Caliptra v2.0 Items to be considered for v2.0 Release label Feb 12, 2025
Newer versions of rust complain about this

Signed-off-by: Arthur Heymans <[email protected]>
Newer version of rust warn about this.

Signed-off-by: Arthur Heymans <[email protected]>
This fixes all the warnings and erros that the newer rust toolchain
throws.

1.84 uses a bit more stack than 1.70.

Signed-off-by: Arthur Heymans <[email protected]>
@ArthurHeymans
Copy link
Contributor Author

It fails formatting on DPE. Main branch of DPE seems to have that fixed, however it would require chipsalliance/caliptra-dpe#388 to be cherry-picked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Caliptra v2.0 Items to be considered for v2.0 Release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants