Rfcs: Add some functions of the console input and output

Created on 4 Feb 2017  路  5Comments  路  Source: rust-lang/rfcs

We should move some functionality from a crate(ncurses) to libstd

  • Change the color of the output text
  • Get the key press from the console(read one character from stdin without having to hit enter)
T-libs

Most helpful comment

In addition to the linking problem, rust is very cautious about adding things to libstd, and the ease of just using a crate when the tool you need is not in std, usually makes it a non-issue.

Is there some reason that using the ncurses trait outside of std is a problem for you?

All 5 comments

We can't use the ncurses crate because that links to the ncurses library (not something libstd should depend on). We could expose something like the term crate but, in it's current form, it's definitely not ready.

While it would be nice to eventually get this kind of functionality into libstd, I'm not even sure we should; most programs won't use it.

In addition to the linking problem, rust is very cautious about adding things to libstd, and the ease of just using a crate when the tool you need is not in std, usually makes it a non-issue.

Is there some reason that using the ncurses trait outside of std is a problem for you?

In my opinion, the standard library should have more comprehensive operating functions on the console.
On the other hand is to eliminate some cross-platform problems.

"Get the key press from the console" is necessary.

I don't think this is something the libs team would be inclined to add and there has been no movement for some time so I'll close this. If you wish to propose it, feel free to write a PR to rust-lang/rust.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

p-avital picture p-avital  路  3Comments

rudolfschmidt picture rudolfschmidt  路  3Comments

clarfonthey picture clarfonthey  路  3Comments

onelson picture onelson  路  3Comments

camden-smallwood-zz picture camden-smallwood-zz  路  3Comments