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

Implement changing the terminal mode to non-canonical mode. #20

Open
sergey6661313 opened this issue May 6, 2023 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@sergey6661313
Copy link

this would allow applications that require this mode to be ported to wasm, such as htop, MC, alsamixer and others (in fact, 95% of the software uses ncurses doing it).
(i found this in c. termios.h functions: tcsetattr tcgetattr)

@rdunnington
Copy link
Owner

Hey thanks for writing this up. I'm not super familiar with this particular API, but looked into it a bit. It doesn't seem too crazy to implement in terms of defining the data types and WASI function interface, then forwarding them to the platform. I did find this issue that is basically a proposal to integrate these functions into WASI so adding them is obviously something people want. WebAssembly/WASI#161

The main problem I see is that the compiler needs to know that the WASI host environment exposes these functions to attempt to import them. Maybe it's enough to define a .h of function prototypes that are custom WASI function extensions within the bytebox project and people can copy the header into their project, calling them if the program is being compiled for the wasm target. That means building the program for wasm won't work without source code modifications, though maybe that's ok since it's a different target anyway.

@rdunnington rdunnington added the enhancement New feature or request label May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants