rat
is a performance oriented re-implementation of cat
in rust
See rat.rs
For a fully fledged coreutils rust stack see uutils
:
https://github.com/uutils/coreutils/
I just wanted to do this as a learning experience for rust.
At least, that's how it started.
Things learned in relation to rust:
Stdout
in rust will always be wrapped by LineWriter
which flushes on new lineWrap the raw file descriptor in BufWriter<File>
instead for more control
Vec<u8>
for buffer has some interesting impacts on runtime performanceEven when that vector is immediately cleared on runtime the behavior between initially empty vs. initially Sized vector is noticeable