wasm-c-api icon indicating copy to clipboard operation
wasm-c-api copied to clipboard

Wasm C API prototype

Results 60 wasm-c-api issues
Sort by recently updated
recently updated
newest added

Hi there, Is there any practical way of building a binary containing multiple different wasm engines which all implement the WebAssembly C API?

`wasm_name_new` is an alias to `wasm_byte_vec_new`, which owns the `ptr_or_none` argument, which is in this case `s`. This patch adds the `own` market to `wasm_name_new_from_string` and `wasm_name_new_from_string_nt`.

The reference types proposal removed `anyref` and replaced it with `externref`.

This patch illustrates what safe interfaces for `wasm_func_call`, `wasm_global_set`, `wasm_instance_new`, `wasm_table_new`, `wasm_table_grow`, `wasm_global_new`, `wasm_table_get`, `wasm_table_set` might look like. This includes 10 new checks, including array length checking and type checking....

As requested [here](https://github.com/WebAssembly/wasm-c-api/issues/80#issuecomment-548530127), this adds a .clang-format that only contains `BasedOnStyle: Chromium`, and applies it to *.c, *.cc, *.h, and *.hh, so folks can see what the impact is.

Previously, both: embedding C/C++ application and the library had to be built using the same DEBUG define, because vec::make_data() and vec::free_data() were declared in the implementation when built with DEBUG...

Signed-off-by: Piotr Sikora

make ``` root@tdevzhang01xinyi1:~/wasm-c-api(master⚡) # make mkdir -p out/example clang++ -c -std=c++11 -DWASM_API_DEBUG -Wall -Werror -ggdb -O -fsanitize=address -I. -Iv8/v8/include -I./include example/hello.cc -o out/example/hello-cc.o In file included from example/hello.cc:1: In file...

v8::Isolate has a TerminateExecution() method which allow forceful termination of execution for the v8::Isolate. Does it make sense to expose this api in wasm-c-api since there is a mapping between...