Re:Vim.js – JavaScript port of Vim
by brotchie on Sunday November 30, 2014 @09:21AM
(#8676863)
Nice, I had a crack at doing this a while back using emscripten, but couldn't get around that Vim's input handling is blocking.
Looks like coolwanglu has found a way around this by hacking some kind of async transformation into emscripten. I haven't looked at his code, but I suspect he specially handles known blocking libc calls. My guess is some how storing the set of stack frames when a blocking function is called so that the stack can be unwound to let the js engine continue.
Looks like coolwanglu has found a way around this by hacking some kind of async transformation into emscripten. I haven't looked at his code, but I suspect he specially handles known blocking libc calls. My guess is some how storing the set of stack frames when a blocking function is called so that the stack can be unwound to let the js engine continue.
Good stuff.