Emscripten integration rewrite by RReverser · Pull Request #10 · mame/xterm-pty (original) (raw)

@RReverser

Apologies in advance, this is a large rewrite and might be hard to review as a diff rather than as just new code.

What this does:

Some extra refactoring changes I found helpful but don't have to be strictly part of this PR:

Some notes:

As a performance taster, here's the Sloane demo built using previous integration (but with added -Os for fair comparison):

Before

vs new integration using -s PROXY_TO_PTHREAD:

After

Now it runs about as fast as in my native terminal!

All the other demos use Asyncify, but this one uses proxying mode for reasons explained in new docs.

Fixes mame#5.