Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is_raw_mode_enabled does not support wasip2 #966

Open
oovm opened this issue Jan 29, 2025 · 2 comments
Open

is_raw_mode_enabled does not support wasip2 #966

oovm opened this issue Jan 29, 2025 · 2 comments

Comments

@oovm
Copy link

oovm commented Jan 29, 2025

crossterm/src/terminal.rs

Lines 107 to 117 in 6d6d3cb

pub fn is_raw_mode_enabled() -> io::Result<bool> {
#[cfg(unix)]
{
Ok(sys::is_raw_mode_enabled())
}
#[cfg(windows)]
{
sys::is_raw_mode_enabled()
}
}

error[E0308]: mismatched types                                                                                                                                                                                                                                        
   --> C:\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\crossterm-0.25.0\src\terminal.rs:104:33
    |
104 | pub fn is_raw_mode_enabled() -> Result<bool> {
    |        -------------------      ^^^^^^^^^^^^ expected `Result<bool, Error>`, found `()`
    |        |
    |        implicitly returns `()` as its body has no tail or `return` expression
    |
    = note:   expected enum `std::result::Result<bool, std::io::Error>`
            found unit type `()`
@aschey
Copy link
Contributor

aschey commented Jan 30, 2025

There's some discussion on this at #654.

@oovm
Copy link
Author

oovm commented Feb 3, 2025

The support for wasi is different from that for wasm(which can be solved using javascript bind).

We need to sort out some basic capabilities of the terminal and submit proposals to the wit interface definition.

Then reintroduce these interfaces in rust ffi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants