Commit Graph

16 Commits

Author SHA1 Message Date
Wenyong Huang
bf28030993
Import WAMR Fast JIT (#1343)
Import WAMR Fast JIT which is a lightweight JIT with quick startup, small footprint,
relatively good performance (~40% to ~50% of LLVM JIT) and good portability.

Platforms supported: Linux, MacOS and Linux SGX.
Arch supported: x86-64.
2022-08-02 16:03:50 +08:00
liang.he
559a0502f1
Enable socket-api recvmsg() and sendmsg() (#1042)
Implement socket-api `recvmsg()` and `sendmsg()` for wasm app,
add sample and update document.
2022-03-30 15:57:40 +08:00
Huang Qi
44d75cec3c
Ignore .cache used by clangd (#1018)
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>

> And another question, I got many warnings while compiling wamr by clang like:
> 
> ```
> [10/67] Building C object CMakeFiles/vmlib.dir/home/huang/Work/wasm-micro-runtime/core/iwasm/common/wasm_exec_env.c.o
> In file included from /home/huang/Work/wasm-micro-runtime/core/iwasm/common/wasm_exec_env.c:6:
> In file included from /home/huang/Work/wasm-micro-runtime/core/iwasm/common/wasm_exec_env.h:11:
> /home/huang/Work/wasm-micro-runtime/core/iwasm/common/../interpreter/wasm.h:573:53: warning: unused parameter 'type_count' [-Wunused-parameter]
> wasm_get_smallest_type_idx(WASMType **types, uint32 type_count,
>                                                     ^
> 1 warning generated.
> [15/67] Building C object CMakeFiles/vmlib.dir/home/huang/Work/wasm-micro-runtime/core/iwasm/common/wasm_application.c.o
> In file included from /home/huang/Work/wasm-micro-runtime/core/iwasm/common/wasm_application.c:8:
> In file included from /home/huang/Work/wasm-micro-runtime/core/iwasm/common/../interpreter/wasm_runtime.h:9:
> /home/huang/Work/wasm-micro-runtime/core/iwasm/interpreter/wasm.h:573:53: warning: unused parameter 'type_count' [-Wunused-parameter]
> wasm_get_smallest_type_idx(WASMType **types, uint32 type_count,
>                                                     ^
> 1 warning generated.
> ```
> 
> It can be fixed simply by -Wno-unused-parameter, but should we fix it by `UNUSED(xxx)` manually ?

It would be great to fix these warnings, but it really takes efforts.
2022-02-23 11:21:14 +08:00
Wenyong Huang
d925369a1f
Implement WAMR-IDE with vscode extension (#943)
Implement WAMR-IDE with vscode extension to enable developing
WebAssembly applications with coding, building, running and
debugging support. Support both Linux and Windows, and only
support putting all the tools in a docker image, e.g. wasi-sdk, wamrc,
iwasm and so on.

Co-authored-by: Wang Ning <justdoitwn@163.com>
2022-01-25 10:10:12 +08:00
liang.he
50b6474f54
Add WASI ABI compatibility check for multi-module (#913)
Refer to https://github.com/WebAssembly/WASI/blob/main/design/application-abi.md
to check the WASI ABI compatibility:
- Command (main module) may export _start function with signature "()"
- Reactor (sub module) may export _initialize function with signature "()"
- _start and _initialize can not be exported at the same time
- Reactor cannot export _start function
- Command and Reactor must export memory

And
- Rename module->is_wasi_module to module->import_wasi_api
- Refactor wasm_loader_find_export()
- Remove MULTI_MODULE related codes from mini_loader
- Update multi-module samples
- Fix a "use-after-free" issue. Since we reuse the memory instance of sub module,
   just to protect it from freeing an imported memory instance
2021-12-29 11:04:36 +08:00
Javan
788e14ed6c
Enable emitting custom name section to aot file (#794)
Enable emitting custom name section to aot file when adding
`--enable-dump-call-stack` or `--enable-dump-call-stack` to
wamrc and there is custom name section in wasm file, which
can be generated by wasi-sdk/emcc "-g" option. So aot runtime
can also get the function name from the custom name section
instead of export section,  to which developer should use
`--export-all` for wasi-sdk/emcc to generate export function
names.
2021-10-26 16:32:52 +08:00
Wenyong Huang
03494f9487
Refactor CI rules: merge ubuntu/macos/android, enable spec test (#777)
Refactor CI rules:
- merge ubuntu/macos/android into one job file
- add job file to test spec cases
- add compilation for lazy jit, debug interpreter and debug aot
- add compilation for performance profile, dump call stack and mini-loader
- re-org llvm build script to build lldb

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-10-11 20:32:29 +08:00
Wenyong Huang
64b5459066
Implement Windows thread/mutex/cond APIs to support multi-thread (#627)
Implement Windows thread/mutex/cond related APIs to support Windows multi-thread feature
Change Windows HW boundary check implementation for multi-thread: change SEH to VEH
Fix wasm-c-api issue of getting AOTFunctionInstance by index, fix wasm-c-api compile warnings
Enable to build invokeNative_general.c with cmake variable
Fix several issues in lib-pthread
Disable two LLVM passes in multi-thread mode to reserve volatile semantic
Update docker script and document to build iwasm with Docker image

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-05-11 16:48:49 +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
Xu Jun
29e45e1527
implement atomic opcode in AOT/JIT (#329) 2020-08-03 11:30:26 +08:00
wenyongh
752826a667
Implement multi-module feature and bulk-memory feature (#271)
Refine wasm loader and aot loader
Fix potential issue of os_mmap/os_munmap
Update document
2020-06-02 14:53:06 +08:00
Xu Jun
5e196253f6
Fix function type not set issue of aot_call_indirect (#229)
Add registration of libc-wasi to 'wasi_snapshot_preview1' to support cargo-wasi
change zephyr build method from cmake to west
fix problem when preserve space for local vars
fix wasi authority problem
2020-04-07 11:04:46 +08:00
Xu Jun
75009a2421
fix sgx compile and link error, preserve space for locals before set/tee opcode (#214)
Co-authored-by: Xu Jun <jun1.xu@intel.com>
2020-03-27 09:28:30 +08:00
Shi Lei
b21ea2f10b
Fixed a bug in simple project building when passing "-p profile" as argument to build.sh; add two more 3rd party folders into git.ignore to avoid merge failure (#209)
* add 3rd party folders which are downloaded during building into git ignore configuration file.

Change-Id: I5a5d913b701bcf6889d89706df65a22c366e24af

Co-authored-by: luc <luc@luc-ubuntu19.bj.intel.com>
2020-03-23 12:05:25 +08:00
Shi Lei
bef67ad7d4
add 3rd party folders which are downloaded during building into git ignore configuration file. (#208)
Co-authored-by: luc <luc@luc-ubuntu19.bj.intel.com>
2020-03-21 10:06:33 +08:00
Jonathan Dong
8deef78624 Add build configuration for Mac (#110)
* Add build configuration for Mac

This patch implements Mac build basically based on Linux platform
implementations and configurations.

The document to build it on Mac has been updated as well.

* Update wasm_application.h

* Update lib_export.h

Add comments for the functions.
2019-09-06 16:51:36 +08:00