-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Wasi run tests #3730
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
Wasi run tests #3730
Changes from all commits
747529e
c3d93cd
14e9c7d
b88bb93
218f9ff
d27721f
0f0d01a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -611,6 +611,7 @@ pub const Target = union(enum) { | |
native, | ||
qemu: []const u8, | ||
wine: []const u8, | ||
wasmtime: []const u8, | ||
unavailable, | ||
}; | ||
|
||
|
@@ -649,6 +650,13 @@ pub const Target = union(enum) { | |
} | ||
} | ||
|
||
if (self.isWasm()) { | ||
switch (self.getArchPtrBitWidth()) { | ||
32 => return Executor{ .wasmtime = "wasmtime" }, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm curious... have you tried this and it didn't worked? @fengb
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Zig build args are generated separately There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We just added support for running wasm files directly without the We will publish a release soon :) |
||
else => return .unavailable, | ||
} | ||
} | ||
|
||
return .unavailable; | ||
} | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would this be better done on the
DirectAllocator
type itself?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.