Skip to content

WasmEdge 0.11.0

Compare
Choose a tag to compare
@github-actions github-actions released this 31 Aug 04:41

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 by const WasmEdge_CallingFrameContext *.
      • The first parameter of WasmEdge_WrapFunc_t is replaced by const WasmEdge_CallingFrameContext *.
    • 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().
    • Renamed the plugin API.
      • Renamed WasmEdge_Plugin_loadWithDefaultPluginPaths() to WasmEdge_PluginLoadWithDefaultPaths().
  • 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, and wasmedge.dll.
    • Users should change the linker flag from lwasmedge_c to lwasmedge.
    • The initialized SONAME is set to libwasmedge.so.0.
    • The initialized SOVERSION is set to libwasmedge.so.0.0.0.

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 the WASMEDGE_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.
  • 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.
    • Developers can use WasmEdge_CallingFrameGetExecutor() API to get the executor context in host function body.
  • Extended the WasmEdge_Result struct to support user defined error codes of host functions.
    • Added WasmEdge_ResultGen() API to generate the WasmEdge_Result struct of user defined error code.
    • Added WasmEdge_ResultGetCategory() API to get the error code category.
  • 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 a new API for compiling a given WASM byte array.
    • Added WasmEdge_CompilerCompileFromBuffer to compile from buffer.
  • 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 the NEON is not supported on the aarch64 platforms.
    • Fixed the sdk_version of lld 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 using wasmedgec tool.
  • WasmEdge CLI failed on Windows 10 issue.
  • 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:

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.