kkawakam / rustyline

Readline Implementation in Rust
https://crates.io/crates/rustyline/
MIT License
1.54k stars 176 forks source link

MinGW support #401

Open fleabitdev opened 4 years ago

fleabitdev commented 4 years ago

Hi folks,

We've recently started looking into shipping a command-line REPL for the GameLisp scripting language (fleabitdev/glsp#11), but it would need to provide working readline-like functionality when it's run on a fresh installation of MinGW.

MinGW's default console (Mintty) seems to be unsupported by all existing Rust crates, and GNU readline itself also seems to be broken on that console.

Are there any major problems which prevent rustyline from providing basic support for Mintty, or is it just something which hasn't been looked into yet? If I were to attempt to implement this feature myself, are there any obstacles I should know about?

(Some previous discussion at #203)

gwenn commented 4 years ago

My suggestion: (a) try to find a Rust crate (not necessarily related to terminal) that uses some MinGW specific API (not the Windows API). (b) try to find a similar library in any language (for example https://github.com/jline/jline3/search?q=mingw&unscoped_q=mingw , https://github.com/jline/jline3/blob/c36dcf4a99defe326ea8f7a9556ad9910acc9207/terminal/src/main/java/org/jline/terminal/TerminalBuilder.java#L345) which may support MinGW and draft your own Term. (c) currently Term implementation is fixed at compile time but we should be able to make the decision at runtime time...

gwenn commented 5 months ago

For reference, https://github.com/crossterm-rs/crossterm/issues/580