Skip to content

Commit 680dc57

Browse files
committed
Migrate to wasmtime cpp API
Hides many of the implementation details of the wasm-c-api. Note: adds `wat` feature to wasmtime c headers to fix the following build error, but note that `wat` support is not enabled in the wasmtime build, this just adds the headers to allow the cpp api to compile. ``` external/com_github_bytecodealliance_wasmtime/crates/c-api/include/wasmtime/module.hh:39:17: error: use of undeclared identifier 'wat2wasm' 39 | auto wasm = wat2wasm(wat); | ^ 1 error generated. ``` Signed-off-by: Matt Leon <mattleon@google.com>
1 parent 96e4f9d commit 680dc57

3 files changed

Lines changed: 171 additions & 542 deletions

File tree

BUILD

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -187,31 +187,11 @@ cc_library(
187187
],
188188
)
189189

190-
genrule(
191-
name = "prefixed_wasmtime_sources",
192-
srcs = [
193-
"src/wasmtime/types.h",
194-
"src/wasmtime/wasmtime.cc",
195-
],
196-
outs = [
197-
"src/wasmtime/prefixed_types.h",
198-
"src/wasmtime/prefixed_wasmtime.cc",
199-
],
200-
cmd = """
201-
for file in $(SRCS); do
202-
sed -e 's/wasm_/wasmtime_wasm_/g' \
203-
-e 's/wasmtime\\/types.h/wasmtime\\/prefixed_types.h/g' \
204-
$$file >$(@D)/$$(dirname $$file)/prefixed_$$(basename $$file)
205-
done
206-
""",
207-
)
208-
209190
cc_library(
210191
name = "wasmtime_lib",
211192
srcs = [
212193
"src/common/types.h",
213-
"src/wasmtime/prefixed_types.h",
214-
"src/wasmtime/prefixed_wasmtime.cc",
194+
"src/wasmtime/wasmtime.cc",
215195
],
216196
hdrs = ["include/proxy-wasm/wasmtime.h"],
217197
copts = [

src/wasmtime/types.h

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)