-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add Windows support #200
base: master
Are you sure you want to change the base?
Conversation
bors try |
tryBuild failed: |
bors try |
While `open_memstream` is part of POSIX, it's not available on Windows. So we need to allocate and grow the buffer manually, old school way.
d42c3b6
to
a89097e
Compare
bors try |
bors try |
tryBuild failed: |
This reverts commit 308f8d9.
bors try |
tryConfiguration problem: |
bors try |
tryBuild failed: |
bors try |
tryBuild failed: |
bors try |
tryBuild failed: |
bors try |
tryBuild failed: |
bors try |
tryBuild failed: |
Any update on this? I'm looking forward this. Thanks. |
Trying to solve my issue with small patch. diff --git a/wasmer/wasi.go b/wasmer/wasi.go
index 4e03fcd..05aa76b 100644
--- a/wasmer/wasi.go
+++ b/wasmer/wasi.go
@@ -20,6 +20,7 @@ package wasmer
// FILE *memory_stream;
// size_t buffer_size = 0;
//
+// #ifndef _WIN32
// memory_stream = open_memstream(buffer, &buffer_size);
//
// if (NULL == memory_stream) {
@@ -39,6 +40,20 @@ package wasmer
// } while (WASI_ENV_READER_BUFFER_SIZE == data_read_size);
//
// fclose(memory_stream);
+// #else
+// char temp_buffer[WASI_ENV_READER_BUFFER_SIZE] = { 0 };
+// size_t data_read_size = WASI_ENV_READER_BUFFER_SIZE;
+//
+// do {
+// data_read_size = reader(wasi_env, temp_buffer, WASI_ENV_READER_BUFFER_SIZE);
+//
+// if (data_read_size > 0) {
+// buffer_size += data_read_size;
+// memcpy(*buffer, temp_buffer, data_read_size);
+// *buffer += data_read_size;
+// }
+// } while (WASI_ENV_READER_BUFFER_SIZE == data_read_size);
+// #endif
//
// return buffer_size;
// } |
The problem seems deeper than I initially though. I've bought a Windows machine and I need to finish the setup so that I can test more easily. Any help is welcomed :-). |
Is it available now?I failed to compile |
I'd like to take over this feature and get it implemented since my project really needs windows support. @Hywan can you give me a summary on what needs to happen here to get this done? |
Any updates on this by chance? |
What´s happen? |
I got the same err on windows, so is there any solution? |
Closes #162.
Closes #69
WIP