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

Add trussed-core crate #178

Merged
merged 5 commits into from
Dec 12, 2024
Merged

Add trussed-core crate #178

merged 5 commits into from
Dec 12, 2024

Conversation

robin-nitrokey
Copy link
Member

@robin-nitrokey robin-nitrokey commented Oct 31, 2024

This PR adds the trussed-core crate (#177) and moves the relevant modules fully or partially to it:

  • api
  • client (only *Client and mechanism traits as well as error and result types)
  • config (only relevant constants)
  • error
  • interrupt
  • serde_extensions (only client traits and error and result types)
  • types (only those types used by other modules)

All moved types are re-exported from their old locations, so this is a compatible change for Trussed’s dependents. As the extension request and reply serialization and deserialization is now split between trussed-core and trussed, I’ve added serialization and deserialization methods to the Extension trait so that trussed does not need to make assumptions about the serialization mechanism used by trussed-core. (Edit: now done in #179)

We will probably want to make some more adjustments before releasing. This PR only intends to perform the split with minimal modifications.

@robin-nitrokey
Copy link
Member Author

@sosthene-nitrokey @daringer Can you have a look this PR? I’d rather not have it open for too long as it touches lots of files and is prone to merge conflicts.

Copy link
Contributor

@sosthene-nitrokey sosthene-nitrokey left a comment

Choose a reason for hiding this comment

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

Right, and we might want to merge before #181 and #182

@sosthene-nitrokey
Copy link
Contributor

A shame that because the original files are trimmed and not fully deleted, it doesn't show as a rename in the diff.

I'm trusting the line count that nothing is missing.

@robin-nitrokey
Copy link
Member Author

I’ve also tested this against nitrokey-3-firmware so I’m pretty sure that nothing is missing. But every rebase risks losing something. :( I’ll merge it now – updating the other PRs is hopefully trivial because store is not touched by this change.

@sosthene-nitrokey
Copy link
Contributor

Yes, updating these PRs will be much easier than rebasing this one.

@robin-nitrokey robin-nitrokey merged commit 20c0dde into main Dec 12, 2024
2 checks passed
@robin-nitrokey robin-nitrokey deleted the core branch December 12, 2024 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants