-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from dunnock/wasi
Add elementary wasi support
- Loading branch information
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
extern crate libc; | ||
use super::{Width, Height}; | ||
|
||
/// For WASI so far it will return none | ||
/// | ||
/// For background https://github.com/WebAssembly/WASI/issues/42 | ||
pub fn terminal_size() -> Option<(Width, Height)> { | ||
return None; | ||
} | ||
|
||
/// This is inherited from unix and will work only when wasi executed on unix. | ||
/// | ||
/// For background https://github.com/WebAssembly/WASI/issues/42 | ||
pub fn move_cursor_up(n: usize) -> String { | ||
format!("\x1B[{}A", n) | ||
} |