ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
main_wasm.c File Reference

WASM entry point that initializes the module without running a blocking loop. More...

Go to the source code of this file.

Detailed Description

WASM entry point that initializes the module without running a blocking loop.

IMPORTANT: Do NOT call mirror_main() or client_main()! Those functions implement terminal-based rendering with blocking main loops that expect TTY I/O and user input - they will hang in the browser.

Instead, JavaScript:

  1. Calls mirror_init_with_args() to initialize the C module
  2. Calls mirror_convert_frame() for each video frame
  3. Manages the render loop with requestAnimationFrame

This entry point satisfies the Emscripten linker requirement for main() but doesn't actually do any blocking operations.

Definition in file main_wasm.c.