Open DecrepitHuman opened 1 year ago
This is indeed an area that is inconvenient as things currently stand. I think probably the easiest workaround for now is to use https://docs.rs/uefi/latest/uefi/table/struct.SystemTable.html#method.unsafe_clone to make a copy of the table and access stdin()
via that copy.
By the way, this is going to be closed by #905
I've written a display driver using
embedded_graphics
and theGraphicsOutput
protocol. I'm using that to display geometry & text to the screen, and need to get keyboard input at the same time. I cannot do this at the moment because of the mutable borrow atSystemTable<Boot>::stdin()
and the immutable borrow atSystemTable<Boot>::boot_services()
that is used for the display driver. I can break these rules by casting the struct to a pointer and then de-referencing it to obtain a new "owned" instance but this is most definitely a ugly solution and I'm not 100% if this will cause problems (more specifically, I don't know if this will interfere with the::boot_services()
call).