ynqa / promkit

A toolkit for building interactive prompt in Rust
https://crates.io/crates/promkit
MIT License
267 stars 7 forks source link

Compilation fails on Windows #15

Closed hepptho closed 7 months ago

hepptho commented 7 months ago

Thank you for making this library, it looks very nice!

Unfortunately, fake_input uses os::unix, preventing compilation on Windows.

I don't know if what fake_input does is possible in a cross-platform fashion, but since it appears to be a utility for testing, and not essential to the library itself, maybe the module could, for now, be omitted on Windows via cfg?

ynqa commented 7 months ago

@hepptho Thank you for the report!

Since there are no internal dependencies on fake_input currently, I will remove it from within promkit.

ynqa commented 7 months ago

In promkit@dev-0.3.1, although on MacOS, I have confirmed that you can build binaries for Windows following these steps.

brew install mingw-w64
rustup target add x86_64-pc-windows-gnu
cargo build --target=x86_64-pc-windows-gnu
hepptho commented 7 months ago

Can confirm dev-0.3.1 compiles on Windows with both gnu and msvc toolchains 👍 Thank you!

ynqa commented 7 months ago

Handled the commit https://github.com/ynqa/promkit/commit/73355151b504f0e6bd3f345f414174f5eb50b277 in #14.