trussed-dev / trussed

Modern Cryptographic Firmware
https://trussed.dev
Apache License 2.0
405 stars 26 forks source link

Remove type parameters from Store #145

Open robin-nitrokey opened 9 months ago

robin-nitrokey commented 9 months ago

Depends on:

Alternatively, we could completely drop the Store trait and just use a struct with three references. To be tested whether that is more efficient.

sosthene-nitrokey commented 9 months ago

 Is this really necessary?

robin-nitrokey commented 9 months ago

It is not necessary, but I think it has multiple benefits: It leads to simpler code. It allows us to get rid of the unnecessary Fs type that is just another level of indirection and another static mut. And it allows us to be more flexible in Store implementations, especially e. g. for the virtual runners or when replacing a storage with RAM. So I would rather ask the question: Why do we need these type parameters?

sosthene-nitrokey commented 9 months ago

Good!