Breaking changes:
- WasmEdge C API changes.
- Merged the
WasmEdge_ImportObjectContext
into theWasmEdge_ModuleInstanceContext
.WasmEdge_ImportObjectCreate()
is changed toWasmEdge_ModuleInstanceCreate()
.WasmEdge_ImportObjectDelete()
is changed toWasmEdge_ModuleInstanceDelete()
.WasmEdge_ImportObjectAddFunction()
is changed toWasmEdge_ModuleInstanceAddFunction()
.WasmEdge_ImportObjectAddTable()
is changed toWasmEdge_ModuleInstanceAddTable()
.WasmEdge_ImportObjectAddMemory()
is changed toWasmEdge_ModuleInstanceAddMemory()
.WasmEdge_ImportObjectAddGlobal()
is changed toWasmEdge_ModuleInstanceAddGlobal()
.WasmEdge_ImportObjectCreateWASI()
is changed toWasmEdge_ModuleInstanceCreateWASI()
.WasmEdge_ImportObjectCreateWasmEdgeProcess()
is changed toWasmEdge_ModuleInstanceCreateWasmEdgeProcess()
.WasmEdge_ImportObjectInitWASI()
is changed toWasmEdge_ModuleInstanceInitWASI()
.WasmEdge_ImportObjectInitWasmEdgeProcess()
is changed toWasmEdge_ModuleInstanceInitWasmEdgeProcess()
.
- Used the pointer to
WasmEdge_FunctionInstanceContext
instead of the index in theFuncRef
value type.WasmEdge_ValueGenFuncRef()
is changed to use theconst WasmEdge_FunctionInstanceContext *
as it's argument.WasmEdge_ValueGetFuncRef()
is changed to return theconst WasmEdge_FunctionInstanceContext *
.
- Moved the functions of
WasmEdge_StoreContext
to theWasmEdge_ModuleInstanceContext
.WasmEdge_StoreListFunctionLength()
andWasmEdge_StoreListFunctionRegisteredLength()
is replaced byWasmEdge_ModuleInstanceListFunctionLength()
.WasmEdge_StoreListTableLength()
andWasmEdge_StoreListTableRegisteredLength()
is replaced byWasmEdge_ModuleInstanceListTableLength()
.WasmEdge_StoreListMemoryLength()
andWasmEdge_StoreListMemoryRegisteredLength()
is replaced byWasmEdge_ModuleInstanceListMemoryLength()
.WasmEdge_StoreListGlobalLength()
andWasmEdge_StoreListGlobalRegisteredLength()
is replaced byWasmEdge_ModuleInstanceListGlobalLength()
.WasmEdge_StoreListFunction()
andWasmEdge_StoreListFunctionRegistered()
is replaced byWasmEdge_ModuleInstanceListFunction()
.WasmEdge_StoreListTable()
andWasmEdge_StoreListTableRegistered()
is replaced byWasmEdge_ModuleInstanceListTable()
.WasmEdge_StoreListMemory()
andWasmEdge_StoreListMemoryRegistered()
is replaced byWasmEdge_ModuleInstanceListMemory()
.WasmEdge_StoreListGlobal()
andWasmEdge_StoreListGlobalRegistered()
is replaced byWasmEdge_ModuleInstanceListGlobal()
.WasmEdge_StoreFindFunction()
andWasmEdge_StoreFindFunctionRegistered()
is replaced byWasmEdge_ModuleInstanceFindFunction()
.WasmEdge_StoreFindTable()
andWasmEdge_StoreFindTableRegistered()
is replaced byWasmEdge_ModuleInstanceFindTable()
.WasmEdge_StoreFindMemory()
andWasmEdge_StoreFindMemoryRegistered()
is replaced byWasmEdge_ModuleInstanceFindMemory()
.WasmEdge_StoreFindGlobal()
andWasmEdge_StoreFindGlobalRegistered()
is replaced byWasmEdge_ModuleInstanceFindGlobal()
.
- Updated the
WasmEdge_VMContext
APIs.- Added the
WasmEdge_VMGetActiveModule()
. WasmEdge_VMGetImportModuleContext()
is changed to return theWasmEdge_FunctionInstanceContext *
.WasmEdge_VMRegisterModuleFromImport()
is changed to use theconst WasmEdge_ModuleInstanceContext *
as it's argument.
- Added the
- For upgrading from
0.9.1
to0.10.0
, please refer to the document.
- Merged the
Features:
- Supported the WASM
tail-call
proposal.- Added the
WasmEdge_Proposal_TailCall
for the configuration in WasmEdge C API. - Users can use the
--enable-tail-call
to enable the proposal inwasmedge
andwasmedgec
tools.
- Added the
- Supported the WASM
extended-const
proposal.- Added the
WasmEdge_Proposal_ExtendedConst
for the configuration in WasmEdge C API. - Users can use the
--enable-extended-const
to enable the proposal inwasmedge
andwasmedgec
tools.
- Added the
- Supported thread-safe in
WasmEdge_VMContext
,WasmEdge_ConfigureContext
,WasmEdge_ModuleInstanceContext
, andWasmEdge_StoreContext
APIs. - Supported the gas limit in AOT mode.
- New supporting of the wasi-socket proposal.
- Supported
send_to
. - Supported
resv_from
.
- Supported
- Plugin support
- Add loadable plugin support.
- Move
wasmedge_process
to a loadable plugin.
Fixed issues:
- Fixed wasi-socket proposal issues.
- Fixed wasi-socket on MacOS.
- Fixed error when calling
poll_oneoff
with the samefd
twice. - Fixed error when calling
fd_close
on socket. - Forged zero-terminated string for
::getaddrinfo
. - Checked the socket options enumeration for valid value.
- Fixed the statistics enable/disable routine.
- Fixed the output format by the file extension name detection on multiple platforms.
Known issues:
- Universal WASM format failed on MacOS platforms.
- In current status, the universal WASM format output of the AOT compiler 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.
- Developers can specify the extension name as
.dylib
on MacOS,.so
on Linux, and.dll
on Windows for the shared library format output of the AOT compiler.
Refactor:
- Supported multi-thread execution.
- Changed the
StackManager
inExecutor
as thread local to support the multi-thread. - Used atomic operations for cost measuring.
- Supported multi-thread timer.
- Changed the
- Refactored the enumerations.
- Replaced the
std::unordered_map
of the enumeration strings withDenseMap
andSpareMap
. - Merged the both C and C++ enumeration definitions into the
enum.inc
file. - Updated the
ErrCode
enumeration for the newest spec tests.
- Replaced the
- Refactored the code architecture for supporting
tail-call
proposal.- Split the
call_indirect
execution routine in compiler into AOT and interpreter path. - Updated the pop frame mechanism in the
StackManager
. - Updated the enter function mechanism.
- Split the
- Refined the file manager in
Loader
.- Supported the offset seeking in file and buffer.
- Skipped the instructions parsing in AOT mode for better loading performance.
- Refined the branch mechanism in the
StackManager
for better performance in the interpreter mode.- Pre-calculated the stack offset for branch in the validation phase.
- Removed the label stack in the
StackManager
and used the pre-calculated data for branch. - Removed the dummy frame mechanism in the
StackManager
.
- Supplied the pointer-based retrieving mechanism in the
StoreManager
andModuleInstance
.- Removed the address mechanism for instances in the
StoreManager
. - Added the unsafe getter functions for the instances.
- Removed the address mechanism for instances in the
- Refactored the
StoreManager
,ModuleInstance
, andExecutor
.- Used the
ModuleInstance
-based resource management instead ofStoreManager
-based. - Moved the ownership of instances from the
StoreManager
into theModuleInstance
. - Merged the
ImportObject
into theModuleInstance
. - Invoking functions by
FunctionInstance
rather than the function name inExecutor
.
- Used the
Documentations:
- Updated the WasmEdge C API documentation for the breaking change.
- For upgrading from
0.9.1
to0.10.0
, please refer to the document. - For the old API of
0.9.1
, please refer to the document.
- For upgrading from
- Updated the WasmEdge GO documentation for the breaking change.
- For upgrading from
v0.9.2
tov0.10.0
, please refer to the document. - For the old API of
v0.9.2
, please refer to the document.
- For upgrading from
Tests:
- Updated the spec tests to the date
20220504
. - Added the spec tests for the
tail-call
proposal. - Added the mixed invocation tests between interpreter mode and AOT mode WASM functions.
- Added the thread-safe and multi-thread execution tests.
- Added wasi-socket tests for
poll_oneoff
,send_to
, andrecv_from
.
Thank all the contributors that made this release possible!
朱亚光, Abhinandan Udupa, Ang Lee, Binbin Zhang, Chin Zhi Wei, DarumaDocker, Elon Cheng, FlyingOnion, Hanged Fish, Herschel Wang, JIAN ZHONG, JcJinChen, Jeremy, JessesChou, JieDing, Kodalien, Kunshuai Zhu, LFsWang, LaingKe, Michael Yuan, Nicholas Zhan, 华德禹, O3Ol, Rui Li, Shen-Ta Hsieh, Shreyas Atre, Sylveon, TheLightRunner, Vaniot, Vinson, 罗泽轩, Xin Liu, Yi Huang, YiYing He, YoungLH, abhinandanudupa, border1px, eat4toast, hydai, jerbmarx, luckyJ-nj, meoww-bot, mydreamer4134, situ2001, tpmccallum, treeplus, wangyuan249, 王琦
If you want to build from source, please use WasmEdge-0.10.0-alpha.1-src.tar.gz instead of the zip or tarball provided by GitHub directly.