Commit Graph

12 Commits

Author SHA1 Message Date
Wenyong Huang
0f1ce9ef3d
Implement wasm-c-api frame/trap APIs for AOT mode (#663)
And update CI workflow to build/cache llvm and run wasm-c-api samples.
2021-07-13 09:01:03 +08:00
Wenyong Huang
b554a9d05d
Implement wasm-c-api frame/trap APIs for interpreter mode (#660)
And enable to cache compiled AOT file buffer for wasm-c-api JIT mode
Avoid checks that rely on undefined C behavior
Fix issues of wasm-c-api sample trap and callback_chain

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-07-06 17:05:59 +08:00
Wenyong Huang
cba4c78273
Enable call wasm-c-api native func directly from interpreter (#656)
And update loader error messages for latest spec cases, fix aot compiler build error based on latest LLVM code base.
2021-06-28 11:59:49 +08:00
Wenyong Huang
77c71e559a
Add wasm-c-api nested function calls sample (#652)
And enable to copy back the return value of wasm main function when calling wasm_application_execute_main, add license headers in wasm-c-api samples, fix several issues reported by klocwork.
2021-06-16 15:26:28 +08:00
doujiang
631838cfd9
fix wasm-c-api sample AOT mode. (#636) 2021-05-27 13:22:35 +08:00
Wenyong Huang
9710d9325f
Fix wasm-c-api JIT mode issue and enable set LLVM_DIR in cmd line (#624) 2021-04-30 09:13:29 +08:00
Wenyong Huang
eb29385963
Implement more wasm-c-apis and enable Envoy integration (#622)
Implement more wasm-c-api APIs to support Envoy integration:
- sync up with latest c-api definition
- change CMakeLists to export necessary headers and install the static library of iwasm
- enable to export tables and memories
- support memorytype and tabletype APIs
- update wasm-c-api sampels
- enable to export importtype APIs

And refine bazel scripts for sample XNNPACK workload, add license headers for sample simple.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-04-27 17:05:40 +08:00
Wenyong Huang
a5188f5574
Add checks to avoid wasm_runtime_malloc memory with size 0 (#507)
In some platforms, allocating memory with size 0 may return NULL but not an empty memory block, which causes runtime load, instantiate or execute wasm/aot file failed. We add checks to try to avoid allocating memory in runtime if the size is 0. And in wasm_runtime_malloc/free, output warning if allocate memory with size 0 and free memory with NULL ptr.
Also fix some coding style issues, fix handle riscv32 ilp32d issue, and fix several wasm-c-api issues.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-01-28 16:16:02 +08:00
lum1n0us
4787b150b8
Enable multi-module support for wasm-c-api (#426)
it is allowed that all imported functions and globals can be
linked by multi-module feature automatically or by wasm-c-api manually
2020-10-16 17:43:57 +08:00
Xiaokang Qin
264e189690
Add Windows support for C-API and Runtime API libraries and examples. (#379)
* Add Windows support for C-API and Runtime API libraries and examples.

Signed-off-by: Wu Zhongmin <vwzm@live.com>
Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com>

* Address the review comments

Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com>

* Rewrite the the bh_getopt to make it avaliable for more kinds of options

Signed-off-by: Wu Zhongmin <vwzm@live.com>
Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com>

* Add the license header

Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com>

Co-authored-by: Zhongmin Wu <vwzm@live.com>
2020-09-11 17:36:04 +08:00
qinxk-inter
049760b849
Fix the build issues on mac for some samples (#358)
Fix the build issues on mac for basic/multi-module/multi-thread/
simple/spawn-thread/wasm-c-api under samples.
And all these samples could be run as expected.

Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com>
2020-08-21 15:14:04 +08:00
lum1n0us
08d01b65c5
Eable post-MVP feature wasm-c-api (#315) 2020-07-23 16:54:13 +08:00