really like this fsmetry
crate (also no_std
):
fsmentry::dsl! {
#[derive(Debug)]
pub Mode {
WaitingInput -> WaitingCommand -> WaitingInput;
WaitingCommand -> SendingFile -> WaitingInput;
WaitingCommand -> ReceivingFile -> WaitingInput;
WaitingCommand -> Exit;
}
}
I use it manage life-cycle in my small serial port tool tior
. I also have some #zmodem code together but it is apparently much bigger leap to implement the #cli interface than it is to implement the protocol. I had to take some time to refactor existing code (e.g. to put FSM in place) and now I’m doing file path auto-completing interface for sending and receiving files with zmodem.
For the text input I’m going to use inquire.
I guess the definition of feature complete for 0.1 version is fully working zmodem transfers and known bugs have been fixed. Right now there is a single known bug: https://github.com/jarkkojs/tior/issues/1.
I wonder if #BeagleV has similar #DIP switch as #VisionFive2, which works as a selector for different boot modes?
In VisionFive2 you can choose to:
These VisionFive2 e.g. pretty capable board for prototyping CPU extensions.
For managing #terminal in #Rust the best option after trying a bunch is avt. The reason is that it has been thrown out a lot with the applications it has been used for. Not so easily found as not available in the #cargo repository. For framework like #ratatui it is pretty trivia to integrate as the the representation is just frame buffer as a byte array.
All various ratatui and tui-rs derived frameworks are pretty immature compared to its robustness. It is much better idea to just decorate avt as it feels quite rock solid with the streamed data.