WasmEdge 0.11.0
0.11.0 (2022-08-31)
Breaking changes:
- WasmEdge C API changes.
- Refactored the host function definition to export the calling frame.
- The first parameter of
WasmEdge_HostFunc_t
is replaced byconst WasmEdge_CallingFrameContext *
. - The first parameter of
WasmEdge_WrapFunc_t
is replaced byconst WasmEdge_CallingFrameContext *
.
- The first parameter of
- Extended the content of
WasmEdge_Result
. - Added the const qualifier of some APIs.
- Added the const qualifer of the first parameter of
WasmEdge_StoreFindModule()
. - Added the const qualifer of the first parameter of
WasmEdge_AsyncWait()
. - Added the const qualifer of the first parameter of
WasmEdge_AsyncWaitFor()
. - Added the const qualifer of the first parameter of
WasmEdge_AsyncGetReturnsLength()
. - Added the const qualifer of the first parameter of
WasmEdge_AsyncGet()
. - Added the const qualifer of the first parameter of
WasmEdge_VMGetFunctionType()
. - Added the const qualifer of the first parameter of
WasmEdge_VMGetFunctionTypeRegistered()
. - Added the const qualifer of the first parameter of
WasmEdge_VMGetFunctionListLength()
. - Added the const qualifer of the first parameter of
WasmEdge_VMGetFunctionList()
. - Added the const qualifer of the first parameter of
WasmEdge_VMGetImportModuleContext()
.
- Added the const qualifer of the first parameter of
- Renamed the plugin API.
- Renamed
WasmEdge_Plugin_loadWithDefaultPluginPaths()
toWasmEdge_PluginLoadWithDefaultPaths()
.
- Renamed
- Refactored the host function definition to export the calling frame.
- Dropped the manylinux1 and manylinux2010 support. Please refer to the deprecation notice.
- Standardize the SONAME and SOVERSION for WasmEdge C API
- The name of the library is changed to
libwasmedge.so
,libwasmedge.dyld
, andwasmedge.dll
. - Users should change the linker flag from
lwasmedge_c
tolwasmedge
. - The initialized SONAME is set to
libwasmedge.so.0
. - The initialized SOVERSION is set to
libwasmedge.so.0.0.0
.
- The name of the library is changed to
Features:
- Updated CMake options of WasmEdge project.
- Added
WASMEDGE_LINK_LLVM_STATIC
option to link the LLVM statically into WasmEdge shared library or tools. - Removed the
WASMEDGE_BUILD_STATIC_TOOLS
option and replaced by theWASMEDGE_LINK_TOOLS_STATIC
option. - For details, please refer to the documentation.
- After this version, our releases on MacOS platforms will link the LLVM library statically to reduce the installation of LLVM from Homebrew for the users.
- Added
- Supported the user-defined error code for host functions.
- The 24-bit size user-defined error code is supported (smaller than 16777216).
- Developers can use the
WasmEdge_ResultGen()
API to generate the result and return.
- Exported the
CallingFrame
instead of the memory instance in host functions.- New
WasmEdge_CallingFrameContext
struct. - Developers can use
WasmEdge_CallingFrameGetModuleInstance()
API to get the module instance of current top frame in calling stack in host function body. - Developers can use
WasmEdge_CallingFrameGetMemoryInstance()
API to get the memory instance by index in host function body.- To quickly upgrate from the previous WasmEdge versions, developer can use the
WasmEdge_CallingFrameGetMemoryInstance(Context, 0)
to get the same memory instance of the previous host function definition.
- To quickly upgrate from the previous WasmEdge versions, developer can use the
- Developers can use
WasmEdge_CallingFrameGetExecutor()
API to get the executor context in host function body.
- New
- Extended the
WasmEdge_Result
struct to support user defined error codes of host functions.- Added
WasmEdge_ResultGen()
API to generate theWasmEdge_Result
struct of user defined error code. - Added
WasmEdge_ResultGetCategory()
API to get the error code category.
- Added
- Added a new API for looking up the native handler from a given WASI mapped Fd/Handler.
- Added
WasmEdge_ModuleInstanceWASIGetNativeHandler
to get the native handler.
- Added
- Added a new API for compiling a given WASM byte array.
- Added
WasmEdge_CompilerCompileFromBuffer
to compile from buffer.
- Added
- Added
httpsreq
plugin on Linux platforms.
Fixed issues:
- Fixed the binary format loading.
- Fixed the error of immediate loading of const instructions in debug mode.
- Updated the
memarg
of memory instructions for the multiple memories proposal changes.
- Fixed the AOT issues.
- Fixed the missed mask of shift operands.
- Fixed the fallback case of vector instructions if the
SSE4.1
is not supported on the x86_64 platforms or theNEON
is not supported on the aarch64 platforms. - Fixed the
sdk_version
oflld
warning on MacOS with LLVM 14.
- Fixed the unexpected error message when execution.
- Refined the terminated case to prevent from printing the unexpected error message.
- Refined the symbols of output WasmEdge shared libraries.
- Removed the weak symbol of WasmEdge plugins.
- Hide the
lld
symbols of WasmEdge shared library.
- Fixed the release packaging.
- Fixed the lost of statically linking LLVM into WasmEdge shared library.
- Fixed the lost of files when packaging on Windows.
Refactor:
- Reorginized the CI workflows to reuse the similar jobs.
- Refactored the enum related headers.
- Separated the C and C++ enum definition headers.
- Not to package the C++ related headers.
- Updated the WASI and plugin host functions for the API change.
Known issues:
- Universal WASM format failed on MacOS platforms.
- In current status, the universal WASM format output of the AOT compiler with the
O1
or upper optimizations on MacOS platforms will cause bus error when execution. - We are trying to fix this issue. For working around, please use the shared library format output of the AOT mode, or set the compiler optimization level to
O0
in WasmEdge C API. - Developers can specify the extension name as
.dylib
on MacOS for the shared library format output when usingwasmedgec
tool.
- In current status, the universal WASM format output of the AOT compiler with the
- WasmEdge CLI failed on Windows 10 issue.
- Please refer to here for the workaround if the
msvcp140.dll is missing
occurs.
- Please refer to here for the workaround if the
- Plug-in linking on MacOS platforms.
- The plug-in on MacOS platforms will cause symbol not found when dynamic linking.
- We are trying to fix this issue. For working around, please implement the host modules instead of plug-ins.
Documentations:
- Updated the WasmEdge build options documentation.
- Updated the WasmEdge C API documentation for the breaking change.
- For upgrading from
0.10.1
to0.11.0
, please refer to the document. - For the old API of
0.10.1
, please refer to the document.
- For upgrading from
Tests:
- Updated the spec tests to the date
20220712
. - Updated the test suite of the multiple memories proposal.
- Updated the plugin tests for the host function API breaking change.
Thank all the contributors that made this release possible!
Cheng-En Lee, Chih-Hsuan Yen, Galden, GreyBalloonYU, HeZean, Michael Yuan, Shen-Ta Hsieh, Xin Liu, Yi Huang, Yi-Ying He, Zhenghao Lu, Zhou Zhou, dm4, hydai
If you want to build from source, please use WasmEdge-0.11.0-src.tar.gz instead of the zip or tarball provided by GitHub directly.