-
Notifications
You must be signed in to change notification settings - Fork 27
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
Improve mechanism features #159
Comments
This would be a significant breaking change but I like it. I also like that the required mechanisms are not one more trait bound. Maybe the const assertion in the backend or runner can be created through a macro. |
On second thought, a simpler solution instead of (3) would be to just add an |
Actually, there is a much simpler approach: have a Edit: I guess |
This makes sure that applications explicitly enable those mechanism that they need and unused mechanisms can easily be disabled. Fixes: #159
This makes sure that applications explicitly enable those mechanism that they need and unused mechanisms can easily be disabled. Fixes: #159
This makes sure that applications explicitly enable those mechanism that they need and unused mechanisms can easily be disabled. Fixes: #159
This makes sure that applications explicitly enable those mechanism that they need and unused mechanisms can easily be disabled. Fixes: #159
This makes sure that applications explicitly enable those mechanism that they need and unused mechanisms can easily be disabled. Fixes: #159
Currently, the mechanisms are behind feature flags, but most of them are enabled by default via the
default-mechanisms
feature. TheMechanism
enum always contains all mechanisms, not depending on the activated features.This approach has some problems:
default-mechanisms
feature set cannot be disabled as soon as one crate in the dependency tree pulls in trussed without disabling the default features.trussed
crate?I’m not sure what the best solution would look like. I want to suggest the following as a basis for discussion:
Mechanism
enum only contains the enabled mechanisms. This ensures that missing mechanism features lead to a compiler error in the client.Mechanisms
helper struct (see below) that can be used to trigger a compiler error if a backend or the firmware does not have the same mechanism set as Trussed.Mechanisms
In Trussed:
In a backend or runner:
The text was updated successfully, but these errors were encountered: