Open gchp opened 9 years ago
Is the goal here to get termbox for C to work on windows, or to jump straight into the pure-Rust version?
In either case this should need the Windows Console API?
FYI I am working on a pure-rust implementation for windows using the kernel32-sys bindings for win console api. LMK if you want me to contribute the code here. This is my first Rust project
@jayrandez the goal would be to get the Rust version working on Windows. My hope for Rustbox in the future would be to drop the C bindings and be entirely standalone. Windows is a bit of a gray area to me, though, so I'd welcome your contributions!
Working on windows version in a fork of rustbox, under the branch "win-dev"
I submitted a pull request which reorganizes the files a bit so that the windows implementation doesn't interfere with the existing linux. No changes to API or build.
Will submit another pull request once windows version implements the full API.
I have started a middle level wrapper around the Windows console API in wio
which should make implementing support here much nicer as you won't have to muck about with raw pointers.
An example of using that wrapper: https://github.com/retep998/wio-rs/blob/master/examples/console.rs
IIRC I had most of the windows support done in a separate fork. I abandoned it though, no time these days.
Is there any chance of integrating @jayrandez's work soon?
@gchp Whats the update for windows build?
Would it be possible to get an update on if/when this might be in process?
Okay, after 4 years I'm interested in working windows version too...
The issue with windows support is that the underlying C library doesn't have windows support.
In order to implement windows support here, the rustbox needs to be re-written to remove the dependency on the C library, similar to the Go implementation (https://github.com/nsf/termbox-go).
I'd be happy to work with someone on this, however I do not have time currently to do all of this development myself.
I'm not sure if this belongs here or in a new issue, but if I build the example code from the README using the Linux Subsystem for Windows (Ubuntu) it compiles and runs but does not quit when I press 'q'.
So far I've only tested this on Linux and Mac. Need to make sure it works correctly on Windows also. Right now I believe this doesn't even build on Windows. See gchp/iota#25 for a starting place.