Closed sosthene-nitrokey closed 3 months ago
No significant changes.
Yes I don't want to leave this that way. This is too unreadable.
I first wanted it to get it working. But the usbip runner did not have the service available in its builder. I'll look into it.
This is actually difficult to do. The Service
used by usbip is pub struct Service<S: StoreProvider, D: Dispatch>(Rc<RefCell<trussed::Service<Platform<S>, D>>>);
, so there is no sound way to have a &mut trussed::Service
at the same time as the ClientBuilder
.
Maybe we need to change the make_client
to be a trait implementation with a build
method, and also a method to get a mut access to the trussed::Service
.
That requires also updating the pc_usbip_runner crate.
I think i'll just put it behind an option and pass None
in the usbip runner, with an unwrap.
Worst case in the future if an new update expects it to always be available, it only breaks the usbip runner.
I think I have the simplest solution.
I opened https://github.com/trussed-dev/pc-usbip-runner/issues/30 so that maybe in the future the usbip runner will match more closely the model of the real runner.
We can get rid of the option once https://github.com/Nitrokey/nitrokey-3-firmware/pull/505 is merged.
Depends on: