pbr 1.1.1

Console progress bar for Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use super::{Height, Width};

/// 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)
}