Commit Graph

386 Commits

Author SHA1 Message Date
Jia Zhang
a2641e174a
Enhance the readability of WAMR SGX docs (#442)
The global doc/linux_sgx.md needs to explicitly describe the methods to
build a debug enclave and hardware running mode. Because using debug key
to signing enclave image rather than production key is still not trivial
in reality.

For the adaption of Inclavare Containers part, add a prolog and give
more details in order to enhance the readability.

Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
2020-11-13 13:11:34 +08:00
Jia Zhang
8f4a1963fc
Update SGX documents (#439)
This commit mainly simplifies the description about building a
debug and hw mode enclave.

Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>

Co-authored-by: root <root@rs1g04412.et2sqa>
2020-11-12 20:59:03 +08:00
Wenyong Huang
a3074df21b
Import SIMD feature and add some workload samples (#438) 2020-11-05 18:15:15 +08:00
Wenyong Huang
667282eea9
Implement stat and getentropy for sgx with ocall to run tensorflow (#436) 2020-10-30 12:36:00 +08:00
YaoLe
ed94b7dcc4
Implement Inclavare Containers PAL interface in WAMR Linux-SGX (#429)
* Implement the PAL interface for rune

Work in progress

Signed-off-by: Le Yao <le.yao@intel.com>

* Support PAL for one runtime with multi-instances

Load runtime into enclave and run multi-instances

Signed-off-by: Le Yao <le.yao@intel.com>
2020-10-29 03:34:34 +00:00
Wang Ning
ad4aa9a85f
Update build script to enable running tensorflow workload in linux-sgx (#435) 2020-10-29 03:33:49 +00:00
Wang Ning
c9c882e43d
Fix compilation error for sgxsdk-2.11 (#431)
sgxsdk-2.11 enable pthread_rwlock APIs support, and causes compilation
error. We use macro SGX_THREAD_LOCK_INITIALIZER to control it.
2020-10-23 18:16:56 +08:00
Wenyong Huang
91b9458ebd
Add more checks to enhance app heap's security (#428) 2020-10-22 18:52:33 +08:00
Wang Ning
c515fb1b75
Add tensorflow sample under samples/workload/tensorflow (#427) 2020-10-22 16:18:37 +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
Karl Fessel
f1fe5d7872
add RIOT-OS support to WAMR (#425)
* add RIOT platform

see riot-os.org

* add simple RIOT example
2020-10-16 11:21:53 +08:00
YAMAMOTO Takashi
2dd3875fd9
nuttx: Fix build for sim on macOS (#423) 2020-10-13 14:14:55 +08:00
YAMAMOTO Takashi
f7903caa65
wasm_loader_ctx_init: Don't use false as a pointer (#422) 2020-10-13 14:13:30 +08:00
Xu Jun
b929ee3f71
Update windows build step, add CI support for windows (#420) 2020-10-13 12:13:18 +08:00
Xu Jun
c87f28eacd
support tail-call in AoT (#419) 2020-10-13 08:34:31 +08:00
Karl Fessel
cc0aab1063
Remove '@' when declare function invokeNative to fix compile error (#417) 2020-10-12 16:52:28 +08:00
Wang Xin
06b045a972 Update readme 2020-09-30 08:30:58 +08:00
Xiaokang Qin
c83a5713f9
Add the fast-interp tail call support (#409)
And also fix one bug in loader for tail-call

Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com>
2020-09-29 10:35:10 +08:00
Wenyong Huang
dc536538ad
Fix sgx enclave module not destroyed issue when loading module failed (#410) 2020-09-29 10:34:06 +08:00
Huang Qi
78c525d21c
platforms/nuttx: Add support for custom name sections & configurable heap pool (#407)
Co-authored-by: Huang Qi <huangqi3@xiaomi.com>
2020-09-28 18:38:58 +08:00
Xu Jun
c13746c22c
move memory_data out from MemoryInstance, add call stack (#408) 2020-09-28 18:38:15 +08:00
Huang Qi
0bf7f7310b
Add NULL check for memory inst in aot/wasm module malloc/free (#403)
* Add NULL check for memory page in aot/wasm module malloc/free

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>

* Update aot_runtime.c

* Update wasm_runtime.c

Co-authored-by: Huang Qi <huangqi3@xiaomi.com>
Co-authored-by: Wenyong Huang <wenyong.huang@intel.com>
2020-09-28 12:44:23 +08:00
Xu Jun
4bfcbc2cab
fix problem about local in fast-interp (#406) 2020-09-27 18:05:20 +08:00
Huang Qi
c59bfe24fb
platforms/nuttx: Use symbol from NuttX to configure build (#402)
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>

Co-authored-by: Huang Qi <huangqi3@xiaomi.com>
2020-09-24 14:36:21 +08:00
Xiaokang Qin
a70daed17d
Add the tail-call feature support for classic-interp (#401)
* Add the tail-call feature support for classic-interp

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

* add CI for tail call and custom name section

* add CI for tail call and custom name section

* update CI for mac

Co-authored-by: Xu Jun <693788454@qq.com>
2020-09-24 12:38:54 +08:00
Wenyong Huang
a3d374eb57
Fix jit target arch not set issue and custom name section typo issue (#400)
And set target machine's cpu to host cpu when creating JIT execution engine.

Signed-off-by: Wenyong Huang wenyong.huang@intel.com
2020-09-24 11:21:20 +08:00
Huang Qi
b639c3ce61
Use macro instead of enum to define MEM_ALLOCATOR for better compatibility (#399)
Co-authored-by: Huang Qi <huangqi3@xiaomi.com>
2020-09-24 10:48:34 +08:00
Xiaokang Qin
a7e7711f63
Add the support for custom name section (#398)
Add the function name field for internal function struct

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

Co-authored-by: Zhongmin Wu <vwzm@live.com>
2020-09-23 16:12:09 +08:00
Huang Qi
a290aaf93e
Fix wasm loader malloc(0) issue which returns NULL is some platforms (#397)
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>

Co-authored-by: Huang Qi <huangqi3@xiaomi.com>
2020-09-23 15:54:22 +08:00
jmpews(AKA.zz)
d8d367b367
Update some assembler directives for darwin target (#395) 2020-09-23 13:10:26 +08:00
Xu Jun
dc4b8c4822
remove errno in wasm_application_execute_func (#396) 2020-09-23 11:50:37 +08:00
Xu Jun
21850aeb0a
add more build option and samples in CI (#394)
* Update linux.yml

* Create mac.yml
2020-09-20 13:16:13 +08:00
Huang Qi
b9f195ce91
Introduce CI support (#391)
Co-authored-by: Huang Qi <huangqi3@xiaomi.com>
2020-09-20 08:33:08 +08:00
Wenyong Huang
e501a6963b
Fix some coding style issues, fix doc typo and refine some codes (#392) 2020-09-20 08:20:45 +08:00
Xiaokang Qin
7c8ccc7c26
Fix the build warnings on Mac (#388)
Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com>
2020-09-18 18:22:26 +08:00
Xiaokang Qin
2d06567cd1
Reimplement the utf8 string check (#389)
Previous implementation doesn't take care of overlong encoding

Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com>
2020-09-18 18:06:13 +08:00
Xu Jun
0226dbbb3d
introduce WAMR memory profiling tool (experimental) (#390) 2020-09-18 18:04:56 +08:00
Huang Qi
04a7cc322f
core/shared: Add guard to avoid redefine macro (#386)
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>

Co-authored-by: Huang Qi <huangqi3@xiaomi.com>
2020-09-16 17:53:03 +08:00
Huang Qi
c004b01be3
Introduce support for NuttX RTOS (#377)
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>

Co-authored-by: Huang Qi <huangqi3@xiaomi.com>
2020-09-15 20:56:45 +08:00
Xu Jun
547298d4e7
Add macro to exclude sgx wasi/pthread ocalls if not needed (#384) 2020-09-15 15:49:09 +08:00
Xu Jun
2499e1ec4b
Fix issue and compilation warnings of new function call APIs (#383) 2020-09-14 15:30:42 +08:00
Xiaokang Qin
728890103b
Add the Windows COFF format support for AOT (#382)
Add the Windows COFF format support to wamr-compiler and iwasm can
load and excute it on Windows(X64) platform.

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

Co-authored-by: Wu Zhongmin <vwzm@live.com>
2020-09-11 18:32:58 +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
Xiaokang Qin
5418e09712
Add two apis for wasm function call (#375)
Add below two apis:

bool wasm_runtime_call_wasm_a(WASMExecEnv *exec_env,
                                                      WASMFunctionInstanceCommon *function,
                                                      uint32 num_results, wasm_val_t results[],
                                                      uint32 num_args, wasm_val_t args[])

bool wasm_runtime_call_wasm_v(WASMExecEnv *exec_env,
                                                      WASMFunctionInstanceCommon *function,
                                                      uint32 num_results, wasm_val_t results[],
                                                      uint32 num_args, ...)

Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com>
2020-09-08 13:03:35 +08:00
Xu Jun
2135badc54
fix problem in wasm_module_malloc (#374) 2020-09-07 17:32:00 +08:00
Xu Jun
2e0cef3ef1
fix exec_env not checked issue, export __heap_base and __data_end in sample to decrease memory usage (#371) 2020-09-05 14:48:08 +08:00
Wenyong Huang
c8df3f6eed
Fix app heap migrate issue and aot compilation warning (#368) 2020-09-03 11:16:38 +08:00
Xu Jun
e113298d7f
use llvm release 10.x (#365) 2020-09-01 16:00:15 +08:00
Wenyong Huang
034606b0a9
Change wasm app offset type from int32 to uint32 (#361)
And fix some sign/unsigned conversion compilation warnings.
2020-08-26 18:33:29 +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