Comments (12)
Agreed! Supporting Windows will be a big win for a cross-platform runtime, which is in our goals.
Here are the things that we will need to do in order to have Windows support:
- wabt-rs upgrade: required for running wabt script tests & executing
.wat
files (we can work on a PR /cc @pepyakin) - Support for Signal Handlers in non *nix systems
- Virtual memory allocation on Windows
- Make Stdio capturer (used in emscripten tests) work in Windows env
- Double check all emscripten syscalls
We will post here the updates once we start working on it.
from wasmer.
@syrusakbary thatโs all great news!
Iโve already started the ball rolling with @pepyakin on windows support.
Iโm also investigating signal support in libc for windows. Seems doable.
from wasmer.
How about storing the tests in a test executable crate and spawning it from integration tests? The standard output can be captured with normal safe rust. There is no platform specific code or unsafe code. I can't imagine the performance is any worse. Thoughts?
That's something we considered on doing before. However, we discared it because of:
- It makes the testing process more complicated: as it needs to do two different builds to test emscripten (one for the binary, other for the tests)
- It makes debugging emscripten tests much harder: since the binary would not be able to output any debug information (as it will be captured and then compared with the expected output)
The WinAPI has buffered pipes, but it would be a completely different implementation from the libc pipe implementation.
We can use two different implementations, one for *nix systems and other for Windows. It might be easier to achieve?
Ideally, I lean towards the second option since it makes the testing and debugging easier. Thoughts?
from wasmer.
Yeah I'll open a full issue with a reproducible example (and maybe tested on Linux too) in a bit.
from wasmer.
It is a shame that wabt-rs doesn't work for Windows. Would love to help, but I don't have much experience with Windows nor have I a windows machine.
from wasmer.
@pepyakin no worries, we will help you on that creating a PR on wabt-rs
when the time comes :)
@xmclark we just added Virtual memory allocation on Windows
with #54, so we are one step closer to be on windows :)
from wasmer.
I think libc
should have basic signals support on windows as of this commit. It may require more tinkering.
I have spent the last few hours getting familiar with the details of stdio capture on windows. I think this is possible with just libc
but it may be dirty. Time will tell! I am interested in any ideas for capture on windows.
from wasmer.
@syrusakbary I think I have a solution for capturing the stdio, but I can't help feel that capturing stdio in-process seems a little round-about. A problem is windows pipes don't seem to be buffered and that has made it a bit more compilcated. The WinAPI has buffered pipes, but it would be a completely different implementation from the libc pipe
implementation.
How about storing the tests in a test executable crate and spawning it from integration tests? The standard output can be captured with normal safe rust. There is no platform specific code or unsafe code. I can't imagine the performance is any worse. Thoughts?
from wasmer.
We added experimental Windows, so it can now run WebAssembly files.
There is still some work to do regarding Emscripten (#176) but other than that everything is tested and green ๐.
We are preparing for Wasmer 0.2.0 and will close this issue once we publish the wasmer.exe file :)
from wasmer.
Okay, so I was able to test it today and it seems like it does work for the most part. However there is something that seems to be broken. In my wasm file I have an exported function that returns a f64 value and that does not seem to be returned correctly by wasmer. I'm getting some garbage value on the host side. I'm not sure if that's just a windows abi mismatch or if this affects Linux and co. as well.
from wasmer.
@CryZe I am glad you're able to try it out! Could you post an issue that reproduces your problem?
from wasmer.
We just published Wasmer 0.2.0 -> https://github.com/wasmerio/wasmer/releases/tag/0.2.0
The new crates are also published.
We created a separate issue to implement the emscripten syscalls in Windows #176.
Here's a useful PR that updates the wasmer-rust-example to the new 0.2.0 API.
Closing the issue :)
from wasmer.
Related Issues (20)
- CLI: "container unpack" command does not correctly unpack atoms HOT 1
- Mobile compatible wasmer engine HOT 4
- example wasm.hh Code running error HOT 1
- Upgrade to tlsv2 HOT 2
- Fuzz tests are broken HOT 1
- WASI Preview 2 Support HOT 3
- Fetching logs for an app fails HOT 2
- Broken on nightly because of ahash 0.7 (aka "update hashbrown") HOT 4
- PHP execution breaks after consecutive requests HOT 2
- Fix failure when fetching logs for an app HOT 2
- Make wordpress (in PHP) run end to end in Wasmer/WASIX HOT 2
- Potential Bug: Use-of-Uninitialized-Value HOT 1
- Possible race condition on `virtual-fs` HOT 1
- CI: Run tests with nightly rustc HOT 1
- Build PHP locally HOT 2
- Add README for wasi-fyi tests HOT 1
- CLI: "wasmer deploy" auto package version bump does not work if package version is out of date HOT 1
- Deprecation of `cfg_attr(..., crate_type = "...")` HOT 2
- (WASI) Wrong file offset after file write in append mode HOT 1
- fs::readdir performance in wasi is not great HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wasmer.