wasmerio/wasmer

Polyfill Emscripten Syscalls for Windows

xmclark opened this issue · 2 comments

This issue is related to #51, windows support. When PR #175 lands, wasmer will have experimental support for windows! This is exciting, but does not mean work is finished. Wasmer will only be able to run simple programs that do not use Emscripten, so no nginx or lua. The reason is that the required syscalls have not been implemented for the Windows target.

There are stubs left for unimplemented functions. Not all of the functions make sense on windows, so a more documented stub should be created if that is what is required. The end result is being able to run programs like nginx and lua, which also means that we can run the existing integration tests. When the stubs are filled and tests are passing, we can close this issue.

The to-be-implemented functions are listed below. The functions should be at least partially tested.

https://github.com/wasmerio/wasmer/blob/master/lib/emscripten/src/syscalls/windows.rs:

  • chown
  • mkdir
  • getgid
  • getgid32
  • dup3
  • ioctl
  • socketcall
  • pread
  • pwrite
  • wait4
  • select
  • setpgid
  • uname

https://github.com/wasmerio/wasmer/blob/master/lib/emscripten/src/io/windows.rs:

  • printf

Enable the tests:

  • emscripten tests
  • integration tests
stale commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale commented

Feel free to reopen the issue if it has been closed by mistake.