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

Extract app trait into apdu-app #24

Merged
merged 1 commit into from
Aug 13, 2024
Merged

Extract app trait into apdu-app #24

merged 1 commit into from
Aug 13, 2024

Conversation

robin-nitrokey
Copy link
Member

Currently, all APDU applications depend on apdu-dispatch to implement the App trait. This means that they also need to be updated if the dispatch implementation is changed. This causes unnecessary releases and maintenance work. By introducing the apdu-app crate, we can change the dispatch implementation without affecting the applications.

Currently, all APDU applications depend on apdu-dispatch to implement
the App trait.  This means that they also need to be updated if the
dispatch implementation is changed.  This causes unnecessary releases
and maintenance work.  By introducing the apdu-app crate, we can change
the dispatch implementation without affecting the applications.
@sosthene-nitrokey
Copy link
Contributor

Before merging it we could also update the App trait:

Replace Command<C> with CommandView (one less const generic.
Bump heapless to 0.8. Sadly heapless hasn't yet released the VecView feature so we still have one const generic, but bumping the heapless version is still better. Since we have released heapless-bytes, we can start migrating everything to heapless 0.8.

@robin-nitrokey
Copy link
Member Author

For crates like this one it would be good to have a trait that provides the Bytes/Vec semantics (push, extend_from_slice) without depending on a specific implementation.

@robin-nitrokey
Copy link
Member Author

Replacing Command with CommandView is a bigger change. Let’s do it in a separate PR. Regarding heapless, I’m no longer sure if it is really worth the effort to migrate now. What is the benefit without the view types? We will need another migration once 0.9 is released anyway.

@robin-nitrokey robin-nitrokey merged commit 6994b0a into main Aug 13, 2024
1 check passed
@robin-nitrokey robin-nitrokey deleted the app branch August 13, 2024 14:26
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.

3 participants