Skip to content
  • Cheng Shao's avatar
    4ea15010
    wasm: support wasi console redirect for the ghci browser mode · 4ea15010
    Cheng Shao authored
    This commit adds optional support for redirecting wasi console
    stdout/stderr back to the host when running wasm ghci browser mode. By
    default, the wasi console outputs are only available under F12
    devtools console, but in case of testing against a mobile browser, the
    devtools console may not be readily available, and it would be more
    convenient to at least get wasi console output on the host side.
    
    The redirection logic is simple, just adding another two WebSockets
    connections that pump the line-buffered textual messages back to
    host.
    
    (cherry picked from commit ad7e271d)
    4ea15010
    wasm: support wasi console redirect for the ghci browser mode
    Cheng Shao authored
    This commit adds optional support for redirecting wasi console
    stdout/stderr back to the host when running wasm ghci browser mode. By
    default, the wasi console outputs are only available under F12
    devtools console, but in case of testing against a mobile browser, the
    devtools console may not be readily available, and it would be more
    convenient to at least get wasi console output on the host side.
    
    The redirection logic is simple, just adding another two WebSockets
    connections that pump the line-buffered textual messages back to
    host.
    
    (cherry picked from commit ad7e271d)
Loading