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

[feature request] support for target wasm32-wasi #41

Closed
mash-graz opened this issue Nov 19, 2019 · 6 comments
Closed

[feature request] support for target wasm32-wasi #41

mash-graz opened this issue Nov 19, 2019 · 6 comments

Comments

@mash-graz
Copy link

@mitsuhiko

right now console only supports unix and windows targets but nothing else.
this makes it rather difficult to compile rust applications depending on this crate to webassembly resp. WASI e.g. for use in webassembly.sh

do you see any simple workaround for this issue?

@mitsuhiko
Copy link
Collaborator

@mash-graz can you make a patch that explicitly covers wasm targets? I think I won't have time to work on this atm but it should be fairly simple to patch.

@mash-graz
Copy link
Author

@mitsuhiko
yes -- i'll try to find a solution or at least acceptable workaround...

it seems to be a open question, how we should handle this terminal related differences in an adequate and compatible manner. this doesn't only concern your crate but also termios-rs and similar stuff. (see: WebAssembly/WASI#42)

@mitsuhiko
Copy link
Collaborator

Yeah. Right now I think the goal would just be to make it compile and have some reasonable default behavior.

@wucke13
Copy link

wucke13 commented Dec 31, 2019

Hi, came here to open up an issue about this.

When in doubt, I guess using the TERM variable could help gathering information. But then again, outputting ANSI escape sequences for colors etc. should be sufficient, the new Windows Terminal App will probably support them too.

@mash-graz
Copy link
Author

mash-graz commented Dec 31, 2019

it's in fact a rather complicated issue, because the wasi core developers want to avoid malicious control sequences on TTY output by rather restrictive precautions ...

see: WebAssembly/WASI#162, WebAssembly/WASI#163, WebAssembly/WASI#167
and bytecodealliance/wasmtime#684

but the main obstacle i would still see in the fact, that we can't realize unbuffered input on the wasi platform, because there is no posix termio.h interface or its counterpart on the windows side available.

see: WebAssembly/WASI#161, WebAssembly/WASI#163

@mitsuhiko
Copy link
Collaborator

For now I made it compile.

Archina pushed a commit to Archina/console that referenced this issue Apr 5, 2021
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

3 participants