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

Clearing console prints characters instead #964

Closed
Rochet2 opened this issue Feb 22, 2020 · 2 comments
Closed

Clearing console prints characters instead #964

Rochet2 opened this issue Feb 22, 2020 · 2 comments

Comments

@Rochet2
Copy link
Contributor

Rochet2 commented Feb 22, 2020

The following code is suggested to be used to clear the console.
The code seems to print the characters to console instead of clearing the console.
Using ubuntu 18.04.4 tested with c94cdc7 and 9c6150b

#include <stdio.h>

int main (int argc, char *argv[]) {
	printf ("Hello world!\n");
	/* try clear console */
	puts ("\033[H\033[J");
	printf("\e[1;1H\e[2J"); 
	return 0;
}

image

Other wasm runtimes like wasm3, wasmer and wavm seemed to clear the console as expected with both codes.
Is this something that should be supported / is a bug?

@rene-fonseca
Copy link

wasmtime filters ansi escape codes that could be used to trick/mislead users.

You can check the topic at WebAssembly/WASI#162

@Rochet2
Copy link
Contributor Author

Rochet2 commented Feb 22, 2020

thanks

@Rochet2 Rochet2 closed this as completed Feb 22, 2020
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