Hi there! WASM noob here. This is probably a stupid question but I can't compile the examples included in the wasm-c-api directory. I followed the instructions under the "Implementation" section of the README but I get a bunch of linkage errors. Any clues as to what I'm doing wrong? Thanks :D
@Pedro Fonseca can you gist the linker errors that you're seeing?
For instance:
/<path_to_wasmtime>/wasmtime/crates/c-api/wasm-c-api/src/wasm-v8.cc:1097: undefined reference to `v8::wasm::object_isolate(v8::Persistent<v8::Object, v8::NonCopyablePersistentTraits<v8::Object> > const&)'
https://gist.github.com/pmvfonseca/f7f9d8d79d57275e3733208e9985f80e
@Pedro Fonseca hm that looks like you're buliding the v8 implementation of the C API and lnking to that
I'm not sure how you built the C API?
I followed the README:
* See `Makefile` for build recipe. Canonical steps to run examples:
1. `make v8-checkout`
2. `make v8`
3. `make all`
@petr
@Pedro Fonseca oh that's the submodule, for Wasmtime you'd want to read the docs
https://bytecodealliance.github.io/wasmtime/c-api/
I was trying to use the C++ bindings which is why I was looking at the examples in the wasm-c-api submodule. I guess I'll look at Wasmtime's C examples instead . Thanks for the help :)
ah yeah at this time we don't have C++ bindings
the ones in the upstream header I suspect are tied to v8
Last updated: Dec 23 2024 at 14:03 UTC