rust-cli / rexpect

.github/workflows/ci.yml
https://docs.rs/rexpect
MIT License
328 stars 56 forks source link

Binary support? #33

Open cheako opened 3 years ago

cheako commented 3 years ago

Some binary data cannot be represented in an &str, so functions that take &[u8] are necessary. Unless I misunderstand or am using the wrong tool.

Use case is programing Marvell ARMADA 3700 over serial port.

cheako commented 3 years ago

Looking at this I can't believe this does not panic when reading half of an unicode char?

cheako commented 3 years ago

https://github.com/cheako/rexpect/tree/binary

philippkeller commented 3 years ago

thanks for reporting this. It looks like you are trying to come up with a pull request. Is this correct? I have very limited time for this project. If you issue a PR and it passes the tests and examples I will merge it

cheako commented 3 years ago

Much more testing is needed, but thanks for doing what you can to maintain this.