Skip to content

Commit d73a024

Browse files
authored
wasmedge: update to v0.11.2. (#318)
Signed-off-by: YiYing He <[email protected]>
1 parent 59102f3 commit d73a024

File tree

5 files changed

+21
-10
lines changed

5 files changed

+21
-10
lines changed

.github/workflows/test.yml

+6
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,12 @@ jobs:
187187
arch: x86_64
188188
action: test
189189
flags: --config=clang
190+
- name: 'WasmEdge on macOS/x86_64'
191+
engine: 'wasmedge'
192+
repo: 'com_github_wasmedge_wasmedge'
193+
os: macos-11
194+
arch: x86_64
195+
action: test
190196
- name: 'Wasmtime on Linux/x86_64'
191197
engine: 'wasmtime'
192198
repo: 'com_github_bytecodealliance_wasmtime'

BUILD

+9-4
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,15 @@ cc_library(
150150
"PROXY_WASM_HAS_RUNTIME_WASMEDGE",
151151
"PROXY_WASM_HOST_ENGINE_WASMEDGE",
152152
],
153-
linkopts = [
154-
"-lrt",
155-
"-ldl",
156-
],
153+
linkopts = select({
154+
"@platforms//os:macos": [
155+
"-ldl",
156+
],
157+
"//conditions:default": [
158+
"-lrt",
159+
"-ldl",
160+
],
161+
}),
157162
deps = [
158163
":wasm_vm_headers",
159164
"//external:wasmedge",

bazel/external/wasmedge.BUILD

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ cmake(
2020
},
2121
generate_args = ["-GNinja"],
2222
lib_source = ":srcs",
23-
out_static_libs = ["libwasmedge_c.a"],
23+
out_static_libs = ["libwasmedge.a"],
2424
)

bazel/repositories.bzl

+3-3
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,9 @@ def proxy_wasm_cpp_host_repositories():
176176
http_archive,
177177
name = "com_github_wasmedge_wasmedge",
178178
build_file = "@proxy_wasm_cpp_host//bazel/external:wasmedge.BUILD",
179-
sha256 = "4cff44e8c805ed4364d326ff1dd40e3aeb21ba1a11388372386eea1ccc7f93dd",
180-
strip_prefix = "WasmEdge-proxy-wasm-0.10.0",
181-
url = "https://github.com/WasmEdge/WasmEdge/archive/refs/tags/proxy-wasm/0.10.0.tar.gz",
179+
sha256 = "65d95e5f83d25ab09fa9a29369f578838e8a519fb170704d0f5896187364429b",
180+
strip_prefix = "WasmEdge-proxy-wasm-0.11.2",
181+
url = "https://github.com/WasmEdge/WasmEdge/archive/refs/tags/proxy-wasm/0.11.2.tar.gz",
182182
)
183183

184184
native.bind(

src/wasmedge/wasmedge.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ void WasmEdge::registerHostFunctionImpl(std::string_view module_name,
417417
auto *func_type = newWasmEdgeFuncType<std::tuple<Args...>>();
418418
data->vm_ = this;
419419
data->raw_func_ = reinterpret_cast<void *>(function);
420-
data->callback_ = [](void *data, WasmEdge_MemoryInstanceContext * /*MemCxt*/,
420+
data->callback_ = [](void *data, const WasmEdge_CallingFrameContext * /*CallFrameCxt*/,
421421
const WasmEdge_Value *Params,
422422
WasmEdge_Value * /*Returns*/) -> WasmEdge_Result {
423423
auto *func_data = reinterpret_cast<HostFuncData *>(data);
@@ -464,7 +464,7 @@ void WasmEdge::registerHostFunctionImpl(std::string_view module_name,
464464
auto *func_type = newWasmEdgeFuncType<R, std::tuple<Args...>>();
465465
data->vm_ = this;
466466
data->raw_func_ = reinterpret_cast<void *>(function);
467-
data->callback_ = [](void *data, WasmEdge_MemoryInstanceContext * /*MemCxt*/,
467+
data->callback_ = [](void *data, const WasmEdge_CallingFrameContext * /*CallFrameCxt*/,
468468
const WasmEdge_Value *Params, WasmEdge_Value *Returns) -> WasmEdge_Result {
469469
auto *func_data = reinterpret_cast<HostFuncData *>(data);
470470
const bool log = func_data->vm_->cmpLogLevel(LogLevel::trace);

0 commit comments

Comments
 (0)