Uh oh!
There was an error while loading. Please reload this page.
Wasi run tests - #3730
Conversation
| /// This allocator makes a syscall directly for every allocation and free. | ||
| /// Thread-safe and lock-free. | ||
| pub const direct_allocator = &direct_allocator_state; | ||
| pub const direct_allocator = if (builtin.arch == .wasm32) wasm_allocator else &direct_allocator_state; |
There was a problem hiding this comment.
Would this be better done on the DirectAllocator type itself?
There was a problem hiding this comment.
I'm not sure. Since the wasm allocator has global state, we need to ensure that direct_allocator and wasm_allocator refer to the same instance.
fengb
commented
Nov 20, 2019
I put wasmtime in build.zig because it was slightly easier to slap in the CLI args than the alternative ( |
We are thinking on enabling |
| if (self.isWasm()) { | ||
| switch (self.getArchPtrBitWidth()) { | ||
| 32 => return Executor{ .wasmtime = "wasmtime" }, |
There was a problem hiding this comment.
I'm curious... have you tried this and it didn't worked? @fengb
32 => return Executor{ .wasi = "wasmer run" },
There was a problem hiding this comment.
Zig build args are generated separately --test-cmd wasmer --test-cmd run so I'd have to update the plumbing to support multiple args.
There was a problem hiding this comment.
That make sense! Thanks for the info.
To support this use case, we are working now on allowing to pass a file as first argument without being explicit with run (so you can do wasmer myfile.wasm).
I'll post an update here once it's ready to be used (which should be very soon!)
There was a problem hiding this comment.
We just added support for running wasm files directly without the run argument.
wasmerio/wasmer#990
We will publish a release soon :)
syrusakbary
commented
Nov 25, 2019
@fengb we just released Wasmer 0.11. With it, you can run Thanks for your feedback, without it we wouldn't have improve the Wasmer CLI to make it a bit easier to use! |
andrewrk
commented
Nov 25, 2019
@syrusakbary thanks for your help! Another question for you if you don't mind. We run CI tests in the following environments:
Can you advise on the best way to obtain Wasmer 0.11 in these environments (or at least a subset)? I'm guessing it won't be in, for example, apt-get for Ubuntu 18.04. |
syrusakbary
commented
Nov 25, 2019
I can provide a powershell script if needed, otherwise just install Wasmer from here: https://github.com/wasmerio/wasmer/releases/download/0.11.0/wasmer-windows.exe
curl https://get.wasmer.io -sSfL | sh
curl https://get.wasmer.io -sSfL | sh
We haven't tested on Alpine, but this should work in both architectures ( curl https://get.wasmer.io -sSfL | sh
I think we don't currently support FreeBSD, but hopefully should not very hard to add. |
andrewrk
commented
Nov 26, 2019
@syrusakbary thanks for the info! I made a follow-up issue for this here: #3775 |
This patches in some missing functionality into
std.os.wasito get tests compiling and running.