trezor-firmware icon indicating copy to clipboard operation
trezor-firmware copied to clipboard

Model R: unite the Rust API with redesigned model T

Open grdddj opened this issue 3 years ago • 0 comments
trafficstars

It would be nice if the API between micropython and Rust was completely the same for model T and model R.

In that way we could reuse (literally reuse or at least copy-paste) almost all the calling and receiving code on both the micropython (trezor/ui/layouts/<model>/__init__.py) and Rust (ui/<model>/layout.rs) side - the only differences would be the UI handling on the Rust side.

It would mean uniting the strategies mostly for string handling - in the model T redesign, we tend to mostly pre-process them in micropython to avoid working with them in Rust, where we only show them. On the other hand, in model R, we are mostly processing them in Rust - which has its own issues.

As model T redesign will be "finished" sooner than model R, I am (from the R perspective) ready to "copy" anything that we will finalize for model T so that both models are as similar as possible.

grdddj avatar Aug 06 '22 15:08 grdddj