BartMassey / rust-nonstdio

rust stdio replacement technology demo
Other
6 stars 0 forks source link

Project Stalled #1

Open BartMassey opened 4 years ago

BartMassey commented 4 years ago

Boy has this project gotten stalled. Need to go back to it. Apologies.

NobodyXu commented 7 months ago

Maybe it's a good idea to improve the libstd implementation?

I.e. instead of using BufWriter on top of LineWriter, write a new struct dedicated for stdout which skips line scanning it is large enough.

BartMassey commented 7 months ago

Maybe! But I think a real issue is that the program should get to choose what buffering algorithm is used. This has worked out real well for UNIX, and I see no reason why it is not the idea here. No heuristic is needed except as a default: let the program override it.

Mostly, I need to find a student to work on this with me :grinning:

NobodyXu commented 7 months ago

Maybe something like rawStdin(), rawStdout() and rawStderr() which has no buffering and simply writes to underlying c FILE* directly?

NobodyXu commented 7 months ago

Aha just realized that there are issues related to that in rust and you havealready commented there https://github.com/rust-lang/rust/issues/58326

NobodyXu commented 7 months ago

And there's an ongoing proposal under discussion https://github.com/rust-lang/libs-team/issues/148

NobodyXu commented 7 months ago

Also a PR to change stdout to use block buffering if stdout is not interactive https://github.com/rust-lang/rust/issues/60673