2019-05-07 02:18:18 +00:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2019 Intel Corporation. All rights reserved.
|
2019-11-11 23:45:21 +00:00
|
|
|
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2019-05-07 02:18:18 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _CONFIG_H_
|
2019-12-18 03:53:43 +00:00
|
|
|
#define _CONFIG_H_
|
2019-05-07 02:18:18 +00:00
|
|
|
|
2021-10-13 07:13:00 +00:00
|
|
|
/* clang-format off */
|
2019-11-01 05:38:45 +00:00
|
|
|
#if !defined(BUILD_TARGET_X86_64) \
|
|
|
|
&& !defined(BUILD_TARGET_AMD_64) \
|
2020-03-24 11:04:29 +00:00
|
|
|
&& !defined(BUILD_TARGET_AARCH64) \
|
2019-11-01 05:38:45 +00:00
|
|
|
&& !defined(BUILD_TARGET_X86_32) \
|
2019-12-24 03:09:54 +00:00
|
|
|
&& !defined(BUILD_TARGET_ARM) \
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
&& !defined(BUILD_TARGET_ARM_VFP) \
|
2019-12-24 03:09:54 +00:00
|
|
|
&& !defined(BUILD_TARGET_THUMB) \
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
&& !defined(BUILD_TARGET_THUMB_VFP) \
|
2019-12-24 03:09:54 +00:00
|
|
|
&& !defined(BUILD_TARGET_MIPS) \
|
2021-01-25 10:41:48 +00:00
|
|
|
&& !defined(BUILD_TARGET_XTENSA) \
|
|
|
|
&& !defined(BUILD_TARGET_RISCV64_LP64D) \
|
|
|
|
&& !defined(BUILD_TARGET_RISCV64_LP64) \
|
|
|
|
&& !defined(BUILD_TARGET_RISCV32_ILP32D) \
|
2021-08-12 09:44:39 +00:00
|
|
|
&& !defined(BUILD_TARGET_RISCV32_ILP32) \
|
|
|
|
&& !defined(BUILD_TARGET_ARC)
|
2021-10-13 07:13:00 +00:00
|
|
|
/* clang-format on */
|
2019-11-01 05:38:45 +00:00
|
|
|
#if defined(__x86_64__) || defined(__x86_64)
|
|
|
|
#define BUILD_TARGET_X86_64
|
|
|
|
#elif defined(__amd64__) || defined(__amd64)
|
|
|
|
#define BUILD_TARGET_AMD_64
|
2020-03-24 11:04:29 +00:00
|
|
|
#elif defined(__aarch64__)
|
|
|
|
#define BUILD_TARGET_AARCH64
|
2019-11-01 05:38:45 +00:00
|
|
|
#elif defined(__i386__) || defined(__i386) || defined(i386)
|
|
|
|
#define BUILD_TARGET_X86_32
|
2019-12-24 03:09:54 +00:00
|
|
|
#elif defined(__thumb__)
|
|
|
|
#define BUILD_TARGET_THUMB
|
|
|
|
#define BUILD_TARGET "THUMBV4T"
|
2019-11-01 05:38:45 +00:00
|
|
|
#elif defined(__arm__)
|
2019-12-24 03:09:54 +00:00
|
|
|
#define BUILD_TARGET_ARM
|
|
|
|
#define BUILD_TARGET "ARMV4T"
|
2019-11-01 05:38:45 +00:00
|
|
|
#elif defined(__mips__) || defined(__mips) || defined(mips)
|
2019-12-24 03:09:54 +00:00
|
|
|
#define BUILD_TARGET_MIPS
|
2019-11-01 05:38:45 +00:00
|
|
|
#elif defined(__XTENSA__)
|
|
|
|
#define BUILD_TARGET_XTENSA
|
2021-01-25 10:41:48 +00:00
|
|
|
#elif defined(__riscv) && (__riscv_xlen == 64)
|
|
|
|
#define BUILD_TARGET_RISCV64_LP64D
|
|
|
|
#elif defined(__riscv) && (__riscv_xlen == 32)
|
|
|
|
#define BUILD_TARGET_RISCV32_ILP32D
|
2021-08-12 09:44:39 +00:00
|
|
|
#elif defined(__arc__)
|
|
|
|
#define BUILD_TARGET_ARC
|
2019-11-01 05:38:45 +00:00
|
|
|
#else
|
|
|
|
#error "Build target isn't set"
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2020-03-16 08:43:57 +00:00
|
|
|
#ifndef BH_DEBUG
|
|
|
|
#define BH_DEBUG 0
|
|
|
|
#endif
|
|
|
|
|
2021-10-13 07:13:00 +00:00
|
|
|
#define MEM_ALLOCATOR_EMS 0
|
2020-09-24 02:48:34 +00:00
|
|
|
#define MEM_ALLOCATOR_TLSF 1
|
2019-05-07 02:18:18 +00:00
|
|
|
|
|
|
|
/* Default memory allocator */
|
|
|
|
#define DEFAULT_MEM_ALLOCATOR MEM_ALLOCATOR_EMS
|
|
|
|
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
#ifndef WASM_ENABLE_INTERP
|
|
|
|
#define WASM_ENABLE_INTERP 0
|
|
|
|
#endif
|
2019-05-07 02:18:18 +00:00
|
|
|
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
#ifndef WASM_ENABLE_AOT
|
|
|
|
#define WASM_ENABLE_AOT 0
|
|
|
|
#endif
|
2019-05-07 02:18:18 +00:00
|
|
|
|
2020-04-13 02:49:40 +00:00
|
|
|
#define AOT_MAGIC_NUMBER 0x746f6100
|
2021-04-15 03:29:20 +00:00
|
|
|
#define AOT_CURRENT_VERSION 3
|
2020-04-13 02:49:40 +00:00
|
|
|
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
#ifndef WASM_ENABLE_JIT
|
|
|
|
#define WASM_ENABLE_JIT 0
|
|
|
|
#endif
|
2019-05-07 02:18:18 +00:00
|
|
|
|
2021-09-07 03:39:57 +00:00
|
|
|
#ifndef WASM_ENABLE_LAZY_JIT
|
|
|
|
#define WASM_ENABLE_LAZY_JIT 0
|
|
|
|
#endif
|
|
|
|
|
2022-01-20 10:40:13 +00:00
|
|
|
#ifndef WASM_LAZY_JIT_COMPILE_THREAD_NUM
|
|
|
|
#define WASM_LAZY_JIT_COMPILE_THREAD_NUM 4
|
|
|
|
#endif
|
|
|
|
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
#if (WASM_ENABLE_AOT == 0) && (WASM_ENABLE_JIT != 0)
|
2021-09-07 03:39:57 +00:00
|
|
|
/* LazyJIT or MCJIT can only be enabled when AOT is enabled */
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
#undef WASM_ENABLE_JIT
|
|
|
|
#define WASM_ENABLE_JIT 0
|
2021-09-07 03:39:57 +00:00
|
|
|
|
|
|
|
#undef WASM_ENABLE_LAZY_JIT
|
|
|
|
#define WASM_ENABLE_LAZY_JIT 0
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
#endif
|
|
|
|
|
2022-08-02 08:03:50 +00:00
|
|
|
#ifndef WASM_ENABLE_FAST_JIT
|
|
|
|
#define WASM_ENABLE_FAST_JIT 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef WASM_ENABLE_FAST_JIT_DUMP
|
|
|
|
#define WASM_ENABLE_FAST_JIT_DUMP 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef FAST_JIT_DEFAULT_CODE_CACHE_SIZE
|
|
|
|
#define FAST_JIT_DEFAULT_CODE_CACHE_SIZE 10 * 1024 * 1024
|
|
|
|
#endif
|
|
|
|
|
2020-02-18 07:15:24 +00:00
|
|
|
#ifndef WASM_ENABLE_WAMR_COMPILER
|
|
|
|
#define WASM_ENABLE_WAMR_COMPILER 0
|
|
|
|
#endif
|
|
|
|
|
2022-01-24 03:10:37 +00:00
|
|
|
#if WASM_ENABLE_WAMR_COMPILER != 0
|
|
|
|
#ifndef WASM_ENABLE_LLVM_LEGACY_PM
|
|
|
|
/* Whether to use LLVM legacy pass manager when building wamrc,
|
|
|
|
by default it is disabled and LLVM new pass manager is used */
|
|
|
|
#define WASM_ENABLE_LLVM_LEGACY_PM 0
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
#ifndef WASM_ENABLE_LIBC_BUILTIN
|
|
|
|
#define WASM_ENABLE_LIBC_BUILTIN 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef WASM_ENABLE_LIBC_WASI
|
|
|
|
#define WASM_ENABLE_LIBC_WASI 0
|
|
|
|
#endif
|
|
|
|
|
2021-02-22 06:17:46 +00:00
|
|
|
#ifndef WASM_ENABLE_UVWASI
|
|
|
|
#define WASM_ENABLE_UVWASI 0
|
|
|
|
#endif
|
|
|
|
|
2020-10-22 08:18:37 +00:00
|
|
|
/* Default disable libc emcc */
|
|
|
|
#ifndef WASM_ENABLE_LIBC_EMCC
|
|
|
|
#define WASM_ENABLE_LIBC_EMCC 0
|
|
|
|
#endif
|
|
|
|
|
2022-09-06 06:29:58 +00:00
|
|
|
#ifndef WASM_ENABLE_LIB_RATS
|
|
|
|
#define WASM_ENABLE_LIB_RATS 0
|
|
|
|
#endif
|
|
|
|
|
2020-06-15 11:04:04 +00:00
|
|
|
#ifndef WASM_ENABLE_LIB_PTHREAD
|
|
|
|
#define WASM_ENABLE_LIB_PTHREAD 0
|
|
|
|
#endif
|
|
|
|
|
2022-08-08 11:59:46 +00:00
|
|
|
#ifndef WASM_ENABLE_LIB_PTHREAD_SEMAPHORE
|
|
|
|
#define WASM_ENABLE_LIB_PTHREAD_SEMAPHORE 0
|
|
|
|
#endif
|
|
|
|
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
#ifndef WASM_ENABLE_BASE_LIB
|
|
|
|
#define WASM_ENABLE_BASE_LIB 0
|
2019-05-07 02:18:18 +00:00
|
|
|
#endif
|
|
|
|
|
2020-03-04 12:12:38 +00:00
|
|
|
#ifndef WASM_ENABLE_APP_FRAMEWORK
|
|
|
|
#define WASM_ENABLE_APP_FRAMEWORK 0
|
|
|
|
#endif
|
|
|
|
|
2020-06-02 06:53:06 +00:00
|
|
|
/* Bulk memory operation */
|
|
|
|
#ifndef WASM_ENABLE_BULK_MEMORY
|
|
|
|
#define WASM_ENABLE_BULK_MEMORY 0
|
|
|
|
#endif
|
|
|
|
|
2020-06-15 11:04:04 +00:00
|
|
|
/* Shared memory */
|
|
|
|
#ifndef WASM_ENABLE_SHARED_MEMORY
|
|
|
|
#define WASM_ENABLE_SHARED_MEMORY 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Thread manager */
|
|
|
|
#ifndef WASM_ENABLE_THREAD_MGR
|
|
|
|
#define WASM_ENABLE_THREAD_MGR 0
|
|
|
|
#endif
|
|
|
|
|
2021-10-26 10:52:30 +00:00
|
|
|
/* Source debugging */
|
|
|
|
#ifndef WASM_ENABLE_DEBUG_INTERP
|
|
|
|
#define WASM_ENABLE_DEBUG_INTERP 0
|
|
|
|
#endif
|
|
|
|
|
2022-04-04 00:23:55 +00:00
|
|
|
#if WASM_ENABLE_DEBUG_INTERP != 0
|
|
|
|
#ifndef DEBUG_EXECUTION_MEMORY_SIZE
|
|
|
|
/* 0x85000 is the size required by lldb, if this is changed to a smaller value,
|
|
|
|
* then the debugger will not be able to evaluate user expressions, other
|
|
|
|
* functionality such as breakpoint and stepping are not influenced by this */
|
|
|
|
#define DEBUG_EXECUTION_MEMORY_SIZE 0x85000
|
|
|
|
#endif
|
|
|
|
#endif /* end of WASM_ENABLE_DEBUG_INTERP != 0 */
|
|
|
|
|
2021-10-26 10:52:30 +00:00
|
|
|
#ifndef WASM_ENABLE_DEBUG_AOT
|
|
|
|
#define WASM_ENABLE_DEBUG_AOT 0
|
|
|
|
#endif
|
|
|
|
|
2022-06-10 13:51:13 +00:00
|
|
|
/* Custom sections */
|
|
|
|
#ifndef WASM_ENABLE_LOAD_CUSTOM_SECTION
|
|
|
|
#define WASM_ENABLE_LOAD_CUSTOM_SECTION 0
|
|
|
|
#endif
|
|
|
|
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
/* WASM log system */
|
2019-08-28 07:08:52 +00:00
|
|
|
#ifndef WASM_ENABLE_LOG
|
2019-05-07 02:18:18 +00:00
|
|
|
#define WASM_ENABLE_LOG 1
|
2019-08-28 07:08:52 +00:00
|
|
|
#endif
|
2019-05-07 02:18:18 +00:00
|
|
|
|
2021-04-01 08:50:46 +00:00
|
|
|
#ifndef WASM_CPU_SUPPORTS_UNALIGNED_ADDR_ACCESS
|
|
|
|
#if defined(BUILD_TARGET_X86_32) || defined(BUILD_TARGET_X86_64) \
|
|
|
|
|| defined(BUILD_TARGET_AARCH64)
|
|
|
|
#define WASM_CPU_SUPPORTS_UNALIGNED_ADDR_ACCESS 1
|
2019-12-13 07:30:30 +00:00
|
|
|
#else
|
2021-04-01 08:50:46 +00:00
|
|
|
#define WASM_CPU_SUPPORTS_UNALIGNED_ADDR_ACCESS 0
|
|
|
|
#endif
|
2019-12-13 07:30:30 +00:00
|
|
|
#endif
|
|
|
|
|
2019-05-07 02:18:18 +00:00
|
|
|
/* WASM Interpreter labels-as-values feature */
|
2021-04-01 08:50:46 +00:00
|
|
|
#ifndef WASM_ENABLE_LABELS_AS_VALUES
|
2020-08-11 03:30:51 +00:00
|
|
|
#ifdef __GNUC__
|
2019-05-07 02:18:18 +00:00
|
|
|
#define WASM_ENABLE_LABELS_AS_VALUES 1
|
2020-08-11 03:30:51 +00:00
|
|
|
#else
|
|
|
|
#define WASM_ENABLE_LABELS_AS_VALUES 0
|
|
|
|
#endif
|
2021-04-01 08:50:46 +00:00
|
|
|
#endif
|
2019-05-07 02:18:18 +00:00
|
|
|
|
2020-07-23 08:54:13 +00:00
|
|
|
/* Enable fast interpreter or not */
|
|
|
|
#ifndef WASM_ENABLE_FAST_INTERP
|
|
|
|
#define WASM_ENABLE_FAST_INTERP 0
|
|
|
|
#endif
|
|
|
|
|
2020-03-07 14:20:38 +00:00
|
|
|
#if WASM_ENABLE_FAST_INTERP != 0
|
|
|
|
#define WASM_DEBUG_PREPROCESSOR 0
|
|
|
|
#endif
|
|
|
|
|
2020-03-18 09:49:23 +00:00
|
|
|
/* Enable opcode counter or not */
|
|
|
|
#ifndef WASM_ENABLE_OPCODE_COUNTER
|
|
|
|
#define WASM_ENABLE_OPCODE_COUNTER 0
|
|
|
|
#endif
|
|
|
|
|
2020-06-02 06:53:06 +00:00
|
|
|
/* Support a module with dependency, other modules */
|
|
|
|
#ifndef WASM_ENABLE_MULTI_MODULE
|
|
|
|
#define WASM_ENABLE_MULTI_MODULE 0
|
|
|
|
#endif
|
|
|
|
|
2020-06-08 03:19:09 +00:00
|
|
|
/* Enable wasm mini loader or not */
|
|
|
|
#ifndef WASM_ENABLE_MINI_LOADER
|
|
|
|
#define WASM_ENABLE_MINI_LOADER 0
|
|
|
|
#endif
|
|
|
|
|
2020-06-28 07:41:25 +00:00
|
|
|
/* Disable boundary check with hardware trap or not,
|
|
|
|
* enable it by default if it is supported */
|
|
|
|
#ifndef WASM_DISABLE_HW_BOUND_CHECK
|
|
|
|
#define WASM_DISABLE_HW_BOUND_CHECK 0
|
|
|
|
#endif
|
|
|
|
|
2020-11-05 10:15:15 +00:00
|
|
|
/* Disable SIMD unless it is manualy enabled somewhere */
|
|
|
|
#ifndef WASM_ENABLE_SIMD
|
|
|
|
#define WASM_ENABLE_SIMD 0
|
|
|
|
#endif
|
|
|
|
|
2020-09-18 10:04:56 +00:00
|
|
|
/* Memory profiling */
|
|
|
|
#ifndef WASM_ENABLE_MEMORY_PROFILING
|
|
|
|
#define WASM_ENABLE_MEMORY_PROFILING 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Memory tracing */
|
|
|
|
#ifndef WASM_ENABLE_MEMORY_TRACING
|
|
|
|
#define WASM_ENABLE_MEMORY_TRACING 0
|
|
|
|
#endif
|
2020-03-30 03:06:39 +00:00
|
|
|
|
2021-01-18 05:23:10 +00:00
|
|
|
/* Performance profiling */
|
|
|
|
#ifndef WASM_ENABLE_PERF_PROFILING
|
|
|
|
#define WASM_ENABLE_PERF_PROFILING 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Dump call stack */
|
|
|
|
#ifndef WASM_ENABLE_DUMP_CALL_STACK
|
|
|
|
#define WASM_ENABLE_DUMP_CALL_STACK 0
|
|
|
|
#endif
|
|
|
|
|
2020-03-30 03:06:39 +00:00
|
|
|
/* Heap verification */
|
2020-09-18 10:04:56 +00:00
|
|
|
#ifndef BH_ENABLE_GC_VERIFY
|
2020-03-30 03:06:39 +00:00
|
|
|
#define BH_ENABLE_GC_VERIFY 0
|
2020-09-18 10:04:56 +00:00
|
|
|
#endif
|
2019-05-07 02:18:18 +00:00
|
|
|
|
2022-09-01 08:15:00 +00:00
|
|
|
/* Enable global heap pool if heap verification is enabled */
|
|
|
|
#if BH_ENABLE_GC_VERIFY != 0
|
|
|
|
#define WASM_ENABLE_GLOBAL_HEAP_POOL 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Global heap pool */
|
|
|
|
#ifndef WASM_ENABLE_GLOBAL_HEAP_POOL
|
|
|
|
#define WASM_ENABLE_GLOBAL_HEAP_POOL 0
|
|
|
|
#endif
|
|
|
|
|
2022-09-03 00:18:45 +00:00
|
|
|
#ifndef WASM_ENABLE_SPEC_TEST
|
|
|
|
#define WASM_ENABLE_SPEC_TEST 0
|
|
|
|
#endif
|
|
|
|
|
2022-09-01 08:15:00 +00:00
|
|
|
/* Global heap pool size in bytes */
|
|
|
|
#ifndef WASM_GLOBAL_HEAP_SIZE
|
|
|
|
#if WASM_ENABLE_SPEC_TEST != 0
|
|
|
|
/* Spec test requires more heap pool size */
|
|
|
|
#define WASM_GLOBAL_HEAP_SIZE (300 * 1024 * 1024)
|
|
|
|
#else
|
|
|
|
#define WASM_GLOBAL_HEAP_SIZE (10 * 1024 * 1024)
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2019-05-07 02:18:18 +00:00
|
|
|
/* Max app number of all modules */
|
|
|
|
#define MAX_APP_INSTALLATIONS 3
|
|
|
|
|
|
|
|
/* Default timer number in one app */
|
|
|
|
#define DEFAULT_TIMERS_PER_APP 20
|
|
|
|
|
|
|
|
/* Max timer number in one app */
|
|
|
|
#define MAX_TIMERS_PER_APP 30
|
|
|
|
|
2019-06-11 02:52:15 +00:00
|
|
|
/* Max connection number in one app */
|
|
|
|
#define MAX_CONNECTION_PER_APP 20
|
|
|
|
|
2019-05-07 02:18:18 +00:00
|
|
|
/* Max resource registration number in one app */
|
|
|
|
#define RESOURCE_REGISTRATION_NUM_MAX 16
|
|
|
|
|
|
|
|
/* Max length of resource/event url */
|
|
|
|
#define RESOUCE_EVENT_URL_LEN_MAX 256
|
|
|
|
|
|
|
|
/* Default length of queue */
|
|
|
|
#define DEFAULT_QUEUE_LENGTH 50
|
|
|
|
|
|
|
|
/* Default watchdog interval in ms */
|
|
|
|
#define DEFAULT_WATCHDOG_INTERVAL (3 * 60 * 1000)
|
|
|
|
|
2019-05-31 06:21:39 +00:00
|
|
|
/* The max percentage of global heap that app memory space can grow */
|
|
|
|
#define APP_MEMORY_MAX_GLOBAL_HEAP_PERCENT 1 / 3
|
|
|
|
|
2019-05-23 10:03:31 +00:00
|
|
|
/* Default min/max heap size of each app */
|
2021-08-12 09:44:39 +00:00
|
|
|
#ifndef APP_HEAP_SIZE_DEFAULT
|
2019-05-23 10:03:31 +00:00
|
|
|
#define APP_HEAP_SIZE_DEFAULT (8 * 1024)
|
2021-08-12 09:44:39 +00:00
|
|
|
#endif
|
2021-01-25 10:41:48 +00:00
|
|
|
#define APP_HEAP_SIZE_MIN (256)
|
2020-03-16 08:43:57 +00:00
|
|
|
#define APP_HEAP_SIZE_MAX (512 * 1024 * 1024)
|
2019-05-07 02:18:18 +00:00
|
|
|
|
2019-05-23 10:03:31 +00:00
|
|
|
/* Default wasm stack size of each app */
|
2019-11-01 05:38:45 +00:00
|
|
|
#if defined(BUILD_TARGET_X86_64) || defined(BUILD_TARGET_AMD_64)
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
#define DEFAULT_WASM_STACK_SIZE (16 * 1024)
|
2019-08-02 06:00:35 +00:00
|
|
|
#else
|
Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent
* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default
* Add a new extension library: connection
* Fix bug of reading magic number and version in big endian platform
* Re-org platform APIs: move most platform APIs from iwasm to shared-lib
* Enhance wasm loader to fix some security issues
* Fix issue about illegal load of EXC_RETURN into PC on stm32 board
* Updates that let a restricted version of the interpreter run in SGX
* Enable native/app address validation and conversion for wasm app
* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused
* Refine binary size and fix several minor issues
Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c
* Add more strict security checks for libc wrapper API's
* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files
* Enhance security of libc strcpy/sprintf wrapper function
* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions
* Remove get_module_inst() and fix issue of call native
* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate
* Refine interpreter call native process, refine memory boudary check
* Fix issues of invokeNative function of arm/mips/general version
* Add a switch to build simple sample without gui support
* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code
* Re-org shared lib header files, remove unused info; fix compile issues of vxworks
* Add build target general
* Remove unused files
* Update license header
* test push
* Restore file
* Sync up with internal/feature
* Sync up with internal/feature
* Rename build_wamr_app to build_wasm_app
* Fix small issues of README
* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc
* Sync up with internal/feature
* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue
* Sync up with internal/feature
* Fix bug of config.h and rename wasi config.h to ssp_config.h
* Sync up with internal/feature
* Import wamr aot
* update document
* update document
* Update document, disable WASI in 32bit
* update document
* remove files
* update document
* Update document
* update document
* update document
* update samples
* Sync up with internal repo
2020-01-21 05:26:14 +00:00
|
|
|
#define DEFAULT_WASM_STACK_SIZE (12 * 1024)
|
2019-08-02 06:00:35 +00:00
|
|
|
#endif
|
2021-02-10 02:11:32 +00:00
|
|
|
/* Min auxilliary stack size of each wasm thread */
|
|
|
|
#define WASM_THREAD_AUX_STACK_SIZE_MIN (256)
|
2019-05-23 10:03:31 +00:00
|
|
|
|
2022-02-11 03:43:03 +00:00
|
|
|
/* Default/min native stack size of each app thread */
|
|
|
|
#if !(defined(APP_THREAD_STACK_SIZE_DEFAULT) \
|
|
|
|
&& defined(APP_THREAD_STACK_SIZE_MIN))
|
2021-10-12 10:11:32 +00:00
|
|
|
#if defined(BH_PLATFORM_ZEPHYR) || defined(BH_PLATFORM_ALIOS_THINGS) \
|
|
|
|
|| defined(BH_PLATFORM_ESP_IDF) || defined(BH_PLATFORM_OPENRTOS)
|
2020-03-04 12:12:38 +00:00
|
|
|
#define APP_THREAD_STACK_SIZE_DEFAULT (6 * 1024)
|
|
|
|
#define APP_THREAD_STACK_SIZE_MIN (4 * 1024)
|
2021-10-12 10:11:32 +00:00
|
|
|
#elif defined(PTHREAD_STACK_DEFAULT) && defined(PTHREAD_STACK_MIN)
|
2021-10-13 07:13:00 +00:00
|
|
|
#define APP_THREAD_STACK_SIZE_DEFAULT PTHREAD_STACK_DEFAULT
|
|
|
|
#define APP_THREAD_STACK_SIZE_MIN PTHREAD_STACK_MIN
|
2022-02-11 03:43:03 +00:00
|
|
|
#elif WASM_ENABLE_UVWASI != 0
|
|
|
|
/* UVWASI requires larger native stack */
|
|
|
|
#define APP_THREAD_STACK_SIZE_DEFAULT (64 * 1024)
|
|
|
|
#define APP_THREAD_STACK_SIZE_MIN (48 * 1024)
|
2021-10-12 10:11:32 +00:00
|
|
|
#else
|
|
|
|
#define APP_THREAD_STACK_SIZE_DEFAULT (32 * 1024)
|
|
|
|
#define APP_THREAD_STACK_SIZE_MIN (24 * 1024)
|
2020-08-11 06:47:24 +00:00
|
|
|
#endif
|
2022-02-11 03:43:03 +00:00
|
|
|
#endif /* end of !(defined(APP_THREAD_STACK_SIZE_DEFAULT) \
|
|
|
|
&& defined(APP_THREAD_STACK_SIZE_MIN)) */
|
|
|
|
|
|
|
|
/* Max native stack size of each app thread */
|
2020-08-11 06:47:24 +00:00
|
|
|
#if !defined(APP_THREAD_STACK_SIZE_MAX)
|
|
|
|
#define APP_THREAD_STACK_SIZE_MAX (8 * 1024 * 1024)
|
2019-05-23 10:03:31 +00:00
|
|
|
#endif
|
2019-08-21 08:39:50 +00:00
|
|
|
|
2020-04-30 09:52:11 +00:00
|
|
|
/* Reserved bytes to the native thread stack boundary, throw native
|
|
|
|
stack overflow exception if the guard boudary is reached */
|
2022-08-12 02:17:11 +00:00
|
|
|
#ifndef WASM_STACK_GUARD_SIZE
|
2022-02-11 03:43:03 +00:00
|
|
|
#if WASM_ENABLE_UVWASI != 0
|
|
|
|
/* UVWASI requires larger native stack */
|
2022-08-12 02:17:11 +00:00
|
|
|
#define WASM_STACK_GUARD_SIZE (4096 * 6)
|
2022-02-11 03:43:03 +00:00
|
|
|
#else
|
2022-08-12 02:17:11 +00:00
|
|
|
#define WASM_STACK_GUARD_SIZE (1024)
|
2022-02-11 03:43:03 +00:00
|
|
|
#endif
|
|
|
|
#endif
|
2020-04-30 09:52:11 +00:00
|
|
|
|
2021-04-19 13:06:56 +00:00
|
|
|
/* Guard page count for stack overflow check with hardware trap */
|
2022-02-11 03:43:03 +00:00
|
|
|
#ifndef STACK_OVERFLOW_CHECK_GUARD_PAGE_COUNT
|
2021-04-19 13:06:56 +00:00
|
|
|
#define STACK_OVERFLOW_CHECK_GUARD_PAGE_COUNT 3
|
2022-02-11 03:43:03 +00:00
|
|
|
#endif
|
2021-04-19 13:06:56 +00:00
|
|
|
|
2020-02-22 13:05:09 +00:00
|
|
|
/* Default wasm block address cache size and conflict list size */
|
2020-09-18 10:04:56 +00:00
|
|
|
#ifndef BLOCK_ADDR_CACHE_SIZE
|
2020-02-22 13:05:09 +00:00
|
|
|
#define BLOCK_ADDR_CACHE_SIZE 64
|
2020-09-18 10:04:56 +00:00
|
|
|
#endif
|
2020-02-22 13:05:09 +00:00
|
|
|
#define BLOCK_ADDR_CONFLICT_SIZE 2
|
|
|
|
|
2020-06-15 11:04:04 +00:00
|
|
|
/* Default max thread num per cluster. Can be overwrite by
|
|
|
|
wasm_runtime_set_max_thread_num */
|
|
|
|
#define CLUSTER_MAX_THREAD_NUM 4
|
|
|
|
|
2020-09-24 04:38:54 +00:00
|
|
|
#ifndef WASM_ENABLE_TAIL_CALL
|
|
|
|
#define WASM_ENABLE_TAIL_CALL 0
|
|
|
|
#endif
|
|
|
|
|
2020-11-30 08:03:51 +00:00
|
|
|
#ifndef WASM_ENABLE_CUSTOM_NAME_SECTION
|
|
|
|
#define WASM_ENABLE_CUSTOM_NAME_SECTION 0
|
|
|
|
#endif
|
|
|
|
|
2021-04-15 03:29:20 +00:00
|
|
|
#ifndef WASM_ENABLE_REF_TYPES
|
|
|
|
#define WASM_ENABLE_REF_TYPES 0
|
|
|
|
#endif
|
|
|
|
|
2019-11-01 05:38:45 +00:00
|
|
|
#endif /* end of _CONFIG_H_ */
|