All notable changes to this project will be documented in this file.
The format is loosely based on Keep a Changelog,
and this project adheres to Semantic Versioning.
Additionally we have an Internal section for changes that are of interest to developers.
Dates in this file are formattes as YYYY-MM-DD.
- Fix a bug in the execution of
i{32,64}.rem_s(MAX, -1). rev-1c3682f- The Wasm spec demanded to return
0while Wasmi trapped withinteger-overflow. - Thanks to davnavr for the detailed bug report.
- The Wasm spec demanded to return
- Fixed a bug that
Config::set_max_cached_stacksset the recursion limit instead. #1721- Thanks to Robert MacWha for reporting the issue.
- Fixed a memory leak in
ByteBufferintroduced in the last patch. #1722- Thanks to Robert MacWha for reporting the issue.
- Fixed a bug when trying to grow
Memorybeyond the system's memory limits. #1722- Thanks to Robert T. Morris (RTM) for reporting this bug!
This release comes with a blog post: Wasmi 1.0
- Added conversions between
TrapCodeandu8. #1651
- Fix SIMD usage in Wasmi's C-API. #1676
- Adjust
table.growbehavior to match Wasmtime's limits. #1710
- Remove all deprecated items from Wasmi's API: #1634
- Removed deprecated types:
- Removed deprecated methods and modules:
- Enable
reference-typesin Wasmi's fuzzing infrastructure. #1708 - Improve Wasmi's Wast runner:
- Minor renamings to simplify integration of Wasmi's new IR.
- Refactor
wasmi_irto reduce compile times. #1640 - Allocate fewer function local constants during Wasm -> Wasmi translation. #1638
- Fixed a bug that
Config::set_max_cached_stacksset the recursion limit instead. #1721- Thanks to Robert MacWha for reporting the issue.
- Fixed a memory leak in
ByteBufferintroduced in the last patch. #1722- Thanks to Robert MacWha for reporting the issue.
- Fixed a bug when trying to grow
Memorybeyond the system's memory limits. #1722- Thanks to Robert T. Morris (RTM) for reporting this bug!
- Fixed a bug that caused miscalculation of function frame sizes. #1699
- This only affected Wasm modules with very large functions with well over 30k instructions.
- This bug was introduced in Wasmi v0.49.0.
- Fixed a bug that may cause incorrect fuel consumption for some
bulk-memorytable instructions. #1690
- Fixed a bug that caused lazily compiled functions to be stuck at compiling when running out of fuel during translation. #1648
- Redesign the stack limits
ConfigAPI. #1631- Deprecated the
StackLimitstype andConfig::set_stack_limitsmethod. - Deprecated the
Config::cached_stacksmethod. - Added
Config::set_{max_recursion_depth,min_stack_height,max_stack_height}methods.
- Deprecated the
This is supposedly the final release before Wasmi 1.0.0.
- This version ships with an entirely new Wasm bytecode to Wasmi bytecode translator.
- The new translator is ~5-10% faster than the old one.
- Fuel-metering is no longer an afterthought and thus comes nearly for free.
- The new codebase is much simpler to maintain and reason about.
- Wasmi bytecode generated by the new translator shows similar performance as the old one.
- The new translator provides a lot more information to Wasmi's optimizer which allows for new optimizations in upcoming Wasmi releases.
- PRs: #1512 #1618
- Add lowerings for xor instructions when used in comparisons.
- This reduced the number of Wasmi bytecode instructions by a whopping 20 which might have positive effects on execution performance due to decreased cache pressure.
- PRs: #1625
- Removed Wasmi bytecode instructions that are no longer generated by the new translator.
- Fix negated
f{32,64}.cmp+selectop-code fusion. #1612
The deprecations introduced in this version prepares Wasmi for its 1.0 release.
- Deprecate
wasmi::coremodule re-export. #1605- Public facing definitions are now re-exported from
wasmi's crate root which users should use instead.
- Public facing definitions are now re-exported from
- Improve Wasmi's Wasmtime API mirror:
- Make
ExternRefnon-nullable and introduce new nullableReftype. #1603- Wasmtime uses
Option<ExternRef>instead which is very similar. Ref<ExternRef>can be converted toOption<ExternRef>using thevalmethod.
- Wasmtime uses
- Remove
FuncReftype in favor ofRef<Func>#1604- Wasmtime uses
Option<Func>instead which is very similar. Ref<Func>can be converted toOption<Func>using thevalmethod.
- Wasmtime uses
- Deprecate
InstancePreandLinker::instantiate#1602- Enable fuel metering and set fuel to zero before instantiation
in order to prevent running a Wasm module's
startfunction upon instantiation.
- Enable fuel metering and set fuel to zero before instantiation
in order to prevent running a Wasm module's
- Deprecate
LinkerBuildertype. #1601- Use
LinkerorInstance::newinstead.
- Use
- Make
- Refactor and clean-up Wasmi's
.wasttest facilities. - Add
.wasttests or convert unit translation tests to.wast.
- Added Wasm
reinterpretoperators towasmi_core::wasmAPI.
- Marked
Module::new_streaming[_unchecked]API deprecated. #1540- Reason for the deprecation:
- The streaming Wasm module creation is not a great fit for Wasmi's target usage.
- No users are known that depend on this functionality - please inform us if you do!
- Streaming Wasm module creating has a performance overhead when not needed.
- Reason for the deprecation:
- Changed
CompilationModedefault toCompilationMode::LazyTranslation. #1530- With this default Wasm is still validated eagerly but tranlated to Wasmi IR lazily. This gives the best of both worlds: fast startup times while avoiding partial validation.
- Update Wasmtime dependencies to v34. #1563
- Fixed a bug that
f{32,64}.copysignwith immediaterhsoperands won't bump fuel. #1539 - Fixed incorrect optimization application for
i64.mul_wide_s. #1545 #1546 - Fixed an
integer-overflowthat could happen when reading or writing memory. #1554
- Optimize
ControlFramememory footprint slightly. #1534 - Slightly optimize
fuse_nezandfuse_eqzroutines. #1559 - Simplified lots of
FuncTranslatorlogic. E.g. #1542 #1550 #1552 - Add some new Wasmi specific
.wasttest cases. #1561 #1562 - Prepare for new Wasmi translator implementation.
- Fixed a memory leak in
ByteBufferintroduced in the last patch. #1722- Thanks to Robert MacWha for reporting the issue.
- Fixed a bug when trying to grow
Memorybeyond the system's memory limits. #1722- Thanks to Robert T. Morris (RTM) for reporting this bug!
- Remove the
downcast-rsdependency from Wasmi crates. #1517 - Bump the minimum supported Rust version (MSRV) to Rust 1.86. #1518
- This change was necessitated by the removal of
downcast-rs.
- This change was necessitated by the removal of
- Lower
selectinstructions more aggressively. #1526- This significantly reduced the number of different
selectinstruction variants and thus might have positive affects on Wasmi's execution performance.
- This significantly reduced the number of different
Store<T>::newno longer requiresT: 'static. #1507- The
T: 'staticrequirement was introduced inv0.45.0in #1449.
- The
- Improve host function call performance. #1506
- Updated dependencies. #1509
- Added support for Wasm function call resumption after running out of fuel. #1498
- This feature is very useful when using Wasmi inside a scheduler that works with Wasmi's fuel metering to provide amount of compute units to different Wasm execution threads for example.
- Added missing
wasmi_core::simdAPI functions forrelaxed-simd. #1447 - Added implementations for Rust's
Errortrait for allwasmierror types onno_std. #1462
- Avoid performing duplicate type and validation checks in
Linker::instantiate. #1476 - Updated
wasm-toolsdependencies to v228. #1463 - Removed most of
wasmi_core::TypedVal's API. #1457- The newer
wasmi_core::wasmAPI is to be preferred and provides the same functionality.
- The newer
- Fixed a bug that Wasmi did not make
wasmparser's parser aware of enabled Wasm features. #1502- Making
wasmparseraware of the enabled Wasm features allows it to detect malformed Wasm binaries during parsing.
- Making
- Make Wasmi's executor non-generic over the
Store'sT. #1449 - Changes to Wasmi's IR:
- Removed all conditional return instructions. #1486
- This allows Wasmi to apply its powerful cmp+branch fusion in more places.
- Remove most of the
bulk-memory(andbulk-table) instruction variants. #1489- Wasmi still has optimized variants for the most common cases.
- Add new logical-comparator instructions. #1494
- This further enhances Wasmi's powerful cmp+branch instruction fusion.
- Add negated
f{32,64}.{lt,le}instructions. #1496- This allows Wasmi to apply its cmp+nez fusion for
f{32,64}.{le,lt}instructions as well.
- This allows Wasmi to apply its cmp+nez fusion for
- Re-design Wasmi's
selectinstructions. #1497- This allows to use Wasmi's powerful cmp op-code fusion for
selectinstructions.
- This allows to use Wasmi's powerful cmp op-code fusion for
- Removed all conditional return instructions. #1486
- Moved many
wasmiinternals intowasmi_core:
- Fixed a bug with executing SIMD
store_laneinstructions. #1450
- Add support for the Wasm
relaxed-simdproposal. #1443- All
relaxed-simdoperators behave deterministically on all platforms supported by Wasmi. - Users have to enable the
simdcrate feature in order to userelaxed-simdcapabilities. - Note that enabling the
simdcrate feature may regress Wasm execution and memory consumption performance.
- All
- Wasmi's CLI now prints multiple results on a new line each. #1438
- With this change Wasmi's CLI and Wasmtime's CLI have the same behavior.
- Add missing
WasmTyimplementation forV128#1437- This prevented using
V128parameters and results in theTypedFuncAPI. - Note that it was still possible to use
V128with theFunc::callAPI.
- This prevented using
- Fixed a bug executing
i8x16.replace_lanewith immediate parameter. #1444
- Added support for the Wasm
simdproposal. #1364- Users have to opt-in to use this feature by enabling Wasmi's
simdcrate feature. - Note: enabling
simdmay introduce Wasm execution overhead, increase memory consumption increase compiled artifact size and compile times for Wasmi crates. So usesimdonly if your use case needs it.
- Users have to opt-in to use this feature by enabling Wasmi's
- Wasmi's minimum supported Rust version is now Rust 1.83. #1405
- Move all Wasm spec tests over to the
wasmi_wastcrate. #1403- This solves a cyclic dev-dependency issue between
wasmiandwasmi_wastcrates.
- This solves a cyclic dev-dependency issue between
- Updated
wasm-toolsand Wasmtime dependencies. #1404
- Fixed a bug in
i64.mul_wide_{s,u}instruction constant evaluation. #1397
- Added support for the Wasm
wide-arithmeticproposal. #1369- The
wide-arithmeticproposal is disabled by default inwasmilibrary and enabled by default in the Wasmi CLI.
- The
- Optimized memory accesses with a constant
ptrvalue. #1381
- Update
wasm-toolsdependencies from v226 to v227. #1380
- Fixed a memory leak in
ByteBufferintroduced in the last patch. #1722- Thanks to Robert MacWha for reporting the issue.
- Fixed a bug when trying to grow
Memorybeyond the system's memory limits. #1722- Thanks to Robert T. Morris (RTM) for reporting this bug!
- Fixed a Wasmi CLI crash when using
.watformatted Wasm files. #1385 - Fixed a crash when translating
memory.growwith ani64.constdelta parameter. #1384- Note: this can only occur when using the Wasm
memory64proposal.
- Note: this can only occur when using the Wasm
- Added support for the Wasm
memory64proposal. #1371- The
memory64proposal is enabled by default inwasmiand the Wasmi CLI.
- The
- Added support for the Wasm
custom-page-sizesproposal. #1349- The
custom-page-sizesproposal is enabled by default inwasmiand the Wasmi CLI.
- The
- Added support to for Wat inputs in
Module::newandModule::new_unchecked. #1328- There deliberately is no Wat support in
Module::new_streamingsince Wat cannot be stream compiled.
- There deliberately is no Wat support in
- Fixed a bug that could lead to crashes when tail calling host functions. #1329
- Fixed a bug that
no_mangeandexport_namewhere used at the same time. #1337
- Bumped Minimum Support Rust Version to v1.82. #1375
- The
memory.growandtable.growinstructions now trap instead of panic when out of system memory.- This change was part of the changes introduced by the support
for the Wasm
memory64andcustom-page-sizesproposals.
- This change was part of the changes introduced by the support
for the Wasm
- No longer use
libmdefault features. #1322 - Implemented several improvements to our fuzzing infrastructure:
- Significantly improved Wasmtime translation (JIT) times. #1339
- Improve debug output of fuzzers. #1344
- Differential fuzzer now uses fuzz input to randomize function parameters. #1348
- Allow fuzzing the Wasm
custom-page-sizesproposal implementation. #1354 - Allow fuzzing the Wasm
memory64proposal implementation. #1379
- Update the Wasm spec testsuite. #1361
- Update
wasm-toolsdependencies to v226. #1374 - Update to
string-internerv0.19. #1367
This release focuses on compile time improvements for Wasmi, significantly reducing the time it takes to compile Wasmi and decrease its compiled artifact size.
- Added optimization for
loadandstorelowering. #1303- This reduces the total number of Wasmi instructions.
- Added
prefix-symbolscrate feature towasmi_c_api_implcrate. #1315- This allows to prefix all exported symbols with
wasmi_in order to avoid duplicate symbols when linking multiple Wasm runtimes implementing the Wasm C-API.
- This allows to prefix all exported symbols with
- C-API
- Conditionally forward the
string-interner/stdcrate feature. #1304 - Fix Wasmtime fuzzer oracle config usage. #1314
- Bumped minimum supported Rust version from v1.79 -> v1.80. #1318
- Replace the
wasmparser-nostdfork with upstreamwasmparser. #1141- This allows Wasmi to implement new Wasm proposals.
- Unfortunately this update also regresses Wasmi translation performance by roughly 5-15% depending on the exact Wasm blob and translation mode.
- Update the
string-internerandhashbrowndependencies. #1305
- Update the
wastdependency for Wasmi's Wast runner. #1306 - Update
wasm-toolsdependencies tov0.221. #1318
- Fixed a bug when translating double negations in expression contexts. #1293
- Add new
LinkerAPIs. #1281Linker::instance: conveniently add exports from an instance to a linker.Linker::alias_module: alias module definitions via another name.Linker::allow_shadowing: enable to shadow previous definitions without errors.
- Add
hash-collectionsandprefer-btree-collectionscrate features to thewasmicrate. #1265- This allows for more fine grained control over Wasmi dependencies to further decrease compile times.
- Add lowering of compare instructions and fused branch+compare instructions. #1243
- This improved performance for certain workloads and reduced the total Wasmi instruction count significantly.
- Fixed a bug in translation of fused
cmp+branchinstructions with huge offsets.- This was fixed as a side product in #1243.
- Removed the
no-hash-mapscrate feature. #1265 - Removed some minor
wasmicrate dependencies. #1266 #1267- This should improve compile times of the
wasmicrate slightly.
- This should improve compile times of the
- Modernize fuzzer and significantly improve fuzzing test coverage.
- Modernize Wasmi
.wastdirectives runner. #1279- Overall this significantly improved readability and maintainability
of the Wasmi
.wastdirectives runner.
- Overall this significantly improved readability and maintainability
of the Wasmi
- Add
no-hash-mapscrate feature to Wasmi CLI and enable it by default. #1225
- Rename various instructions and add
ShiftAmountabstraction. #1221 - Use Rust's
ControlFlowutility. #1223 - Use
get_memoryinloadandstoreexecution handlers. #1224
-
Added a new
extra-checkscrate feature to thewasmicrate. #1217- This improves unreachability checks in when
debug-assertionsorextra-checksare enabled. - If
extra-checksare disabled, some technically unnecessary runtime checks are no longer performed. - Use
extra-checksif your focus is on safety, disable if your focus is on performance.
- This improves unreachability checks in when
- Fixed a bug in local preservation when translating Wasm
loopcontrol flow. #1218
- Fixed a bug in
selecttranslation constant propagation. #1213
- Added support for Wasm
multi-memoryproposal. #1191 - Added
Store::call_hookAPI. #1144- Contributed by emiltayl.
- Updated WASI dependencies. #1140
- This fixes some long-standing bugs in the
wasmi_wasicrate.
- This fixes some long-standing bugs in the
- This release includes all fixes that have been backported to
v0.36.1,v0.36.2andv0.36.5.
- Add new Wasmi bytecode. #1152
- This was a major undertaking with lots of sub-issues and PRs.
- The Wasmi bytecode definitions now reside in their own
wasmi_ircrate. - Most of the definitions are sourced from a single Rust macro to reduce maintenance friction.
- Remove unnecessary
iextendinstructions. #1147 - Changed encoding for Wasmi
call_indirectinstructions. #1156- The new encoding improves performance and reduces the number of function local constants.
- Changed encoding for Wasmi
selectinstructions. #1157- The new encoding is more straight-forward and aims to simplify the Wasmi executor and translator.
- Changed encoding for Wasmi
br_tableinstruction. #1158- The new encoding improves performance and memory consumption for certain use cases.
- Minor improvements to Wasmi bytecode.
- Fixed a bug with
table.gettranslation whenindexis a preserved register. #commit-b4e78d
- Fixed a bug in local preservation when translating Wasm
loopcontrol flow. #1218
- Fixed a bug in
selecttranslation constant propagation. #1213
- Fix miri reported UB in
FuncRefandExternRefconversions. #1201 - Fix bug in
table.initfrom importedglobal.getvalues. #1192
- Changed some
inlineannotations in the Wasmi executor. #commit-b4e78d- This change had minor positive effects on the performance of commonly executed Wasmi instructions.
- Fixed
ref.is_nulltranslation constant propagation issue. #1189 - Fixed invalid overwrite of preserved local register. #1177
- Removed faulty
br_tableoptimization. - Fix a few
clippywarnings.
- Added support for the official Wasm C-API. (wasmi-labs#1009)
- This allows to use Wasmi from any program that can interface with C code.
- The
wasmi_c_api_implcrate allows to use Wasmi via the Wasm C-API from Rust code.
- Added
Instance::newAPI. (wasmi-labs#1134)- This was mainly needed to support the Wasm C-API.
- The new API offers a more low-level way for Wasm module instantiation that may be more efficient for certain use cases.
- Added
Cloneimplementation forModule. (wasmi-labs#1130)- This was mainly needed to support the Wasm C-API.
- The store fuel API now returns
Errorinstead ofFuelError. (wasmi-labs#1131)- This was needed to support the Wasm C-API.
- The
FuelErroris still accessible via theError::kindmethod.
- Fixed a dead-lock that prevented users from compiling Wasm modules in host functions
called from Wasmi's executor. (wasmi-labs#1122)
- This was a very long-standing bug in the Wasmi interpreter and it is now finally closed.
- Note that this regressed performance of call-intense workloads by roughly 5-10%. Future work is under way to hopefully fix these regressions.
- Before this fix, users had to use a work-around using resumable function calls to cirumvent this issue which is no longer necessary, fortunately.
- Add
CodeMap::alloc_funcsAPI and use it when compiling Wasm modules. (wasmi-labs#1125)- This significantly improved performance for lazily compiling
Wasm modules (e.g. via
Module::new) by up to 23%.
- This significantly improved performance for lazily compiling
Wasm modules (e.g. via
- Allows Wasmi CLI to be installed with locked dependencies. (#1096)
- This can be done as follows:
cargo install --locked wasmi_cli
- This can be done as follows:
- Allow Wasm module instantiation in host functions called from Wasmi's executor. (#1116)
- Limit number of parameter and result types in
FuncTypeto 1000, each. (#1116)
- Significantly improved and Wasmi's CI and made it a lot faster.
- Refactored and cleaned-up call based and Rust sourced Wasmi benchmarks.
- Added
Errortrait impls for all Wasmi error types impleemntingDisplay. (wasmi-labs#1089)- Contributed by kajacx.
- Fixed compilation for Rust versions <1.78. (wasmi-labs#1093)
- Fixed nightly
clippywarning aboutmap_err. (wasmi-labs#1094)
- Added support for Wasm custom sections processing. (wasmi-labs#1085)
- It is now possible to query name and data of Wasm custom sections of a
Module. - Use the new
Config::ignore_custom_sectionsflag to disable this functionality.
- It is now possible to query name and data of Wasm custom sections of a
- Added
Config::ignore_custom_sectionsflag to disable processing custom sections if this is unwanted. (wasmi-labs#1085) - Add
Memory::{data_ptr, data_size, size}methods. (wasmi-labs#1082) - Added a Wasmi usage guide documentation. (wasmi-labs#1072)
- Optimized the Wasmi executor in various ways.
- In summary the Wasmi executor now more optimally caches the currently used Wasm instance and optimizes access to instance related data. In particular access to the default linear memory bytes as well as the value of the global variable at index 0 (often used as shadow stack pointer) are more efficient.
- The following PRs are part of this effort:
- Changed
Memory::growsignature to mirror Wasmtime'sMemory::growmethod. (wasmi-labs#1082)
- Removed
Memory::current_pagesmethod. (wasmi-labs#1082)- Users should use the new
Memory::sizemethod instead.
- Users should use the new
- Fix overlapping reuse of local preservation slots. (wasmi-labs#1057)
- Thanks again to kaiavintr for reporting the bug.
- Refine and generalize the fix for v0.32.1. (wasmi-labs#1054)
- Fixes a miscompilation when merging two copy instructions where the result of the first copy is also the input to the second copy and vice versa. (wasmi-labs#1052)
- Thanks to kaiavintr for reporting the bug.
Note:
- This release is the culmination of months of research, development and QA with a new execution engine utilizing register-based IR at its core boosting both startup and execution performance to new levels for the Wasmi interpreter.
- This release is accompanied with an article that presents some of the highlights.
- Added a new execution engine based on register-based bytecode. (wasmi-labs#729)
- The register-based Wasmi
Engineexecutes roughly 80-100% faster and compiles roughly 30% slower according to benchmarks conducted so far.
- The register-based Wasmi
- Added
Module::new_uncheckedAPI. (wasmi-labs#829)- This allows to compile a Wasm module without Wasm validation which can be useful when users know that their inputs are valid Wasm binaries.
- This improves Wasm compilation performance for faster startup times by roughly 10-20%.
- Added Wasm compilation modes. (wasmi-labs#844)
- When using
Module::newWasmi eagerly compiles Wasm bytecode into Wasmi bytecode which is optimized for efficient execution. However, this compilation can become very costly especially for large Wasm binaries. - The solution to this problem is to introduce new compilation modes, namely:
CompilationMode::Eager: Eager compilation, what Wasmi did so far. (default)CompilationMode::LazyTranslation: Eager Wasm validation and lazy Wasm translation.CompilationMode::Lazy: Lazy Wasm validation and translation.
- Benchmarks concluded that
CompilationMode::LazyTanslation: Usually improves startup performance by a factor of 2 to 3.CompilationMode::Lazy: Usually improves startup performance by a factor of up to 27.
- Note that
CompilationMode::Lazycan lead to partially validated Wasm modules which can introduce non-determinism when using different Wasm implementations. Therefore users should know what they are doing when usingCompilationMode::Lazyif this is a concern. - Enable lazy Wasm compilation with:
let mut config = wasmi::Config::default(); config.compilation_mode(wasmi::CompilationMode::Lazy);
- When
CompilationMode::LazyorCompilationMode::LazyTranslationand fuel metering is enabled the first function access that triggers compilation (and validation) will charge fuel respective to the number of bytes of the Wasm function body. (wasmi-labs#876)
- When using
- Added non-streaming Wasm module compilation. (wasmi-labs#1035)
- So far Wasmi only offered a streaming Wasm module compilation API, however most users
probably never really needed that. So starting from this version both
Module::newandModule::new_uncheckedare now non-streaming with insane performance improvements of up to 80% in certain configurations. - For streaming Wasm module users we added
Module::new_streamingandModule::new_streaming_uncheckedAPIs.
- So far Wasmi only offered a streaming Wasm module compilation API, however most users
probably never really needed that. So starting from this version both
- Added
Module::validateAPI. (wasmi-labs#840)- This allows to quickly check if a Wasm binary is valid according to a Wasmi
Engineconfig. - Note that this does not translate the Wasm and thus
Module::neworModule::new_uncheckedmight still fail due to translation errors.
- This allows to quickly check if a Wasm binary is valid according to a Wasmi
- CLI: Added
--compilation-modeargument to enable lazy Wasm compilation. (wasmi-labs#849) - Added
--verbosemode to Wasmi CLI by @tjpalmer. (wasmi-labs#957)- By default Wasmi CLI no longer prints messages during execution.
- Added
Memory::new_staticconstructor by @Ddystopia. (wasmi-labs#939)- This allows to construct a Wasm
Memoryfrom a static byte array which is especially handy for certain embedded use cases.
- This allows to construct a Wasm
- Added
LinkerBuildertype. (wasmi-labs#989)- Using
LinkerBuilderto create newLinkers with the same set of host functions is a lot more efficient than creating thoseLinkers the original way. However, the initialLinkerBuilderconstruction will be as inefficient as building up aLinkerpreviously.
- Using
- Added
EnforcedLimitsconfiguration option toConfig. (wasmi-labs#985)- Some users want to run Wasm binaries in a specially restricted or limited mode.
For example this mode limits the amount of functions, globals, tables etc. can be defined
in a single Wasm module.
With this change they can enable this new strict mode using
In future updates we might relax this to make
let mut config = wasmi::Config::default(); config.enforced_limits(wasmi::EnforcedLimits::strict());
EnforcedLimitsfully customizable.
- Some users want to run Wasm binaries in a specially restricted or limited mode.
For example this mode limits the amount of functions, globals, tables etc. can be defined
in a single Wasm module.
With this change they can enable this new strict mode using
- Added
EngineWeakconstructed viaEngine::weak. (wasmi-labs#1003)- This properly mirrors the Wasmtime API and allows users to store weak references to the
Engine.
- This properly mirrors the Wasmtime API and allows users to store weak references to the
- Added
no-hash-mapscrate feature to thewasmicrate. (wasmi-labs#1007)- This tells the
wasmicrate to avoid using hash based data structures which can be beneficial for running Wasmi in some embedded environments such aswasm32-unknown-unknownthat do not support random sources and thus are incapable to spawn hash maps that are resilient to malicious actors. - Note that Wasmi has always avoided using hash map based data structures prior to this change so not enabling this new crate feature kind of acts as an optimization.
- This tells the
- Added
Defaultimplementation forStore<T> where T: Default. (wasmi-labs#1031)- This mostly serves as a convenient way to create a minimal Wasmi setup.
- Added
WasmTyimplementations forf32andf64Rust primitives. (wasmi-labs#1031)- This is convenience for
Linker::func_wrapcalls that take those primitives as arguments. Before this change users had to useF32andF64instead which is a bit cumbersome.
- This is convenience for
- Minimum Rust version set to 1.77. (wasmi-labs#961)
- CLI: Enabled Wasm
tail-callsandextend-constproposals by default. (wasmi-labs#849)- We expect those Wasm proposals to be stabilized very soon so we feel safe to enable them by default already.
- Improved
DebugandDisplayimpls for NaNs of Wasmf32andf64values.- They now show
nan:0x{bytes}where{bytes}is their respective raw bytes.
- They now show
- Implement
SyncforResumableInvocationandTypedResumableInvocation. (wasmi-labs#870) - Properly mirror Wasmtime's fuel API. (wasmi-labs#1002)
- Renamed some Wasmi items to improve its Wasmtime mirroring. (wasmi-labs#1011)
- Improved Wasmtime API mirror for Store fuel. (wasmi-labs#1002)
- Enabled
Config::tail_callandConfig::extended_constby default. (wasmi-labs#1031)- Those Wasm proposals have been moved to phase 4 for many months now.
- Removed the stack-machine bytecode based Wasmi
Enginebackend. (wasmi-labs#818)- The new register-based bytecode based Wasmi
Engineis more promising and the Wasmi team does not want to maintain two different engine backends.
- The new register-based bytecode based Wasmi
- Removed
FuelConsumptionModefromConfig. (wasmi-labs#877)FuelConsumptionModewas required to differentiate between lazy and eager fuel consumption. This was necessary due to how lazy fuel consumption was implemented in that it would pre-charge for instruction execution were the exact amount of required fuel was not possible to determine at compilation time. Examples arememory.growandtable.copyinstructions. The linked PR improved lazy fuel consumption to no longer pre-charge and instead pre-check if the operation is going to succeed and only charge fuel in that case.
- Added execution fuzzing and differential fuzzing.
- PRs: wasmi-labs#832, wasmi-labs#833
- Both fuzzing strategies are applied on each commit in our CI pipeline.
- Updated CI jobs to use
dtolnay/rust-toolchaininstead ofactions-rsbecause the latter was deprecated. (wasmi-labs#842)
- Added
ResourceLimiterAPI known from Wasmtime. (wasmi-labs#737)- This API allows to limit growable Wasm resources such as Wasm tables and linear memories.
- Special thanks to Graydon Hoare for contributing this feature!
- Fixed a bug were
Module::len_globalsinternal API returned length of linear memories instead. (wasmi-labs#741)
- Removed
intxcrate dependency. (wasmi-labs#727)- The dependence on the
intxcrate was accidental and not really required at any time.
- The dependence on the
- Optimized
f64.constinstructions forf64constant values that can losslessly be encoded as 32-bitf32value. (wasmi-labs#746)
- We now publish and record graphs of benchmarks over time. (wasmi-labs#740)
- This allows Wasmi developers to better inspect performance changes over longer periods of time.
- Updated dev. dependencies:
criterion 0.4.0->0.5.0wast 0.52.0->0.62.0
- Optimized Wasmi bytecode memory consumption. (wasmi-labs#718)
- This reduced the memory consumption of Wasmi bytecode by organizing the instructions into so-called instruction words, effectively reducing the amount of bytes required per Wasmi instruction 16 bytes to 8 bytes. There was an experiment with 4 bytes but experiments confirmed that 8 bytes per instruction word was the sweetspot for Wasmi execution and translation performance.
- This did not affect execution performance too much but we saw performance improvements for translation from Wasm to Wasmi bytecode by roughly 15-20%.
- Optimized
callandreturn_callfor Wasm module internal calls. (wasmi-labs#724)- Wasmi bytecode now differentiates between calls to Wasm module internal functions and imported functions which allows the Wasmi bytecode executor to perform the common internal calls more efficiently.
- This led to an execution performance improvement across the board but especially for call intense workloads of up to 30% in some test cases.
- Added support for
extended-constWasm proposal. (wasmi-labs#707) - Added fuel consumption modes. (wasmi-labs#706)
- This allows eager and lazy fuel consumption modes to be used which
mainly affects bulk operations such as
table.copyandmemory.grow. Eager fuel consumption always consumes fuel before a bulk operation for the total amount independent of success or failure of the operation whereras lazy fuel consumption only consumes fuel for successful executions.
- This allows eager and lazy fuel consumption modes to be used which
mainly affects bulk operations such as
- Normalize fuel costs of all instructions. (wasmi-labs#705)
- With this change most instructions cost roughly 1 fuel upon execution. This is more similar to how Wasmtime deals with fuel metered instruction costs. Before this change Wasmi tried to have fuel costs that more closely mirror the computation intensity of the respective instruction according to benchmarks.
- Added support for the
tail-callWasm proposal. (wasmi-labs#683) - Added support for
Linkerdefined host functions. (wasmi-labs#692)- Apparently this PR introduced some performance wins for the Wasm target according to our tests. This information shall be taken with a grain of salt since we are not sure why those performance improvement occured since the PR's functionality is orthogonal to Wasm engine performance.
- Required precursor refactoring PR: wasmi-labs#681
- The
wasmi_wasicrate now more closely mirrors thewasmtime_wasicrate API. (wasmi-labs#700)
- Refactor the Wasmi Wasm engine to handle Wasm calls and returns in its core. (#694)
- This improved performance of Wasm function calls significantly at the cost of host function call performance.
- Also this seemed to have impacts Wasm target performance quite positively, too.
- The
Storenow handles Wasm functions and host functions separately. (wasmi-labs#686)- This allows to store Wasm functions into the
StoreInnertype which was an important step towards the major refactoring in (#694) - It was expected that host function call performance would degrade by this PR but our tests actually showed that the opposite was true and Wasm target performance was improved overall.
- This allows to store Wasm functions into the
- Introduce
ValueStackPtrabstraction for the Wasmi engine core. (wasmi-labs#688)- This change significantly improved performance especially on the Wasm target according to our tests.
- Optimize
memory.{load,store}when reading or writing single bytes. (wasmi-labs#689)- The performance wins were more modest than we hoped but still measurable.
- Use
StoreContextMut<T>instead ofimpl AsContextMutin the Wasmi engine core. (wasmi-labs#685)- This is a simple refactoring with the goal to make the Rust compiler have a simpler job at
optimizing certain functions in the engine's inner workings since
StoreContextMutprovides more information to the compiler.
- This is a simple refactoring with the goal to make the Rust compiler have a simpler job at
optimizing certain functions in the engine's inner workings since
- Added support for fuel metering in the Wasmi CLI. (wasmi-labs#679)
- Users can now specify an amount of fuel via
--fuel Nto commit for the execution. Upon success the Wasmi CLI will display the total amount of consumed and remaining fuel.
- Users can now specify an amount of fuel via
- Fixed a bug that Wasmi CLI did not preserve the WASI exit status. (wasmi-labs#677)
- Thanks to YAMAMOTO Takashi @yamt for reporting the issue.
- The Wasmi CLI now properly displays exported functions if
--invoke xwas provided andxwas not found. (wasmi-labs#678) - Applied minor fixes to
Configdocs. (wasmi-labs#673)
- Defer charging fuel for costly bulk
memoryand bulktableoperations. (wasmi-labs#676)- Note that the check to assert that enough fuel is provided for these costly operation is still happening before the actual computation and only the charging is deferred to after a successful run. The reason behind this is that all the affected operations fail fast and therefore should not cost lots of fuel in case of failure.
- Fixed a bug where resuming a resumable function from a host function with more outputs than
inputs could lead to incorrect behavior or runtime panics. (wasmi-labs#671)
- Thanks to Pierre Krieger (tomaka) for reporting and crafting an initial minimal test case.
- Wasmi CLI: Add WASI support. (wasmi-labs#597)
- Big shoutout to Onigbinde Oluwamuyiwa Elijah for contributing this to Wasmi!
- Add built-in support for fuel metering. (wasmi-labs#653)
- This allows to control the runtime of Wasm executions in a deterministic fasion effectively avoiding the halting problem by charging for executed instructions. Not using the feature will not affect the execution efficiency of Wasmi for users.
- Add
Pages::checked_submethod. (wasmi-labs#660) - Add
Func::newconstructor. (wasmi-labs#662)- This allows to create
Funcinstances from closures without statically known types.
- This allows to create
- Update to
wasmparser-nostdversion0.100.1. (wasmi-labs#666)
- Clean up and reorganization of the
wasmi_clicrate. (wasmi-labs#655) - Refactoring of internal host call API. (wasmi-labs#664)
- Added
Config::floatsoption to enable or disable Wasm float operators during Wasm validation. Trap::downcast_mutandTrap::downcastmethods. (wasmi-labs#650)- This helps users to downcast into
T: HostError.
- This helps users to downcast into
- Added
WasmTypeimpls forFuncRefandExternReftypes. (wasmi-labs#642)- This allows
FuncRefandExternRefinstances to be used inTypedFuncparameters and results.
- This allows
- Removed from
Fromimpls fromwasmparser-nostdtypes to Wasmi types.- For example
From<wasmparser::FuncType> for wasmi::FuncTypegot removed.
- For example
- Update the
wasmparser-nostddependency from version0.91.0to0.99.0. (wasmi-labs#640) - The
Traptype is no longerClone. (wasmi-labs#650)
- Resolved plenty of technical debt and improved structure of the Wasmi crate.
- Added support for the
bulk-memoryWasm proposal. (wasmi-labs#628) - Added support for the
reference-typesWasm proposal. (wasmi-labs#635) - Added
ValueType::{is_ref, is_num} methods. (wasmi-labs#635) - Added
Value::{i32, i64, f32, f64, externref, funcref}accessor methods toValue.
- Fix a bug with
TableandMemoryimports not respecting the current size. (wasmi-labs#635)- This sometimes led to the problem that valid
TableandMemoryimports could incorrectly be rejected for having an invalid size for the subtype check. - This has been fixed as part of the
reference-typesWasm proposal implementation.
- This sometimes led to the problem that valid
- Use more references in places to provide the compiler with more optimization opportunities. (wasmi-labs#634)
- This led to a speed-up across the board for Wasm targets of about 15-20%.
- Move the
Valuetype fromwasmi_coreto Wasmi. (wasmi-labs#636)- This change was necessary in order to support the
reference-typesWasm proposal.
- This change was necessary in order to support the
- There has been some consequences from implementing the
reference-typesWasm proposal which are listed below:- The
Valuetype no longer implementsCopyandPartialEq. - The
From<&Value> for UntypedValueimpl has been removed. - Remove some
Fromimpls forValue. - Moved some
Displayimpls for types likeFuncTypeandValueto thewasmi_clicrate. - Remove the
try_intoAPI from theValuetype.- Users should use the new accessor methods as in the Wasmtime API.
- The
- Update
wastdependency from version0.44to0.52. (wasmi-labs#632) - Update the Wasm spec testsuite to the most recent commit:
3a04b2cf9 - Improve error reporting for the internal Wasm spec testsuite runner.
- It will now show proper span information in many more cases.
Note: This is the Wasmtime API Compatibility update.
- Add
Module::get_exportmethod. (wasmi-labs#617)
- Removed
ModuleErrorexport from crate root. (wasmi-labs#618)- Now
ModuleErroris exported fromcrate::errorsjust like all the other error types.
- Now
- Refactor and cleanup traits underlying to
IntoFunc. (wasmi-labs#620)- This is only the first step in moving closer to the Wasmtime API traits.
- Mirror Wasmtime API more closely. (wasmi-labs#615, wasmi-labs#616)
- Renamed
Caller::host_datamethod toCaller::data. - Renamed
Caller::host_data_mutmethod toCaller::data_mut. - Add
Extern::tymethod and theExternTypetype. - Rename
ExportItemtoExportType:- Rename the
ExportItem::kindmethod totyand returnExternTypeinstead ofExportItemKind. - Remove the no longer used
ExportItemKindentirely.
- Rename the
- The
ExportsIternow yields items of the new typeExportinstead of pairs of(&str, Extern). - Rename
ModuleImporttoImportType.- Rename
ImportType::item_typetoty. - Rename
ImportType::fieldtoname. - Properly forward
&strlifetimes inImportType::{module, name}. - Replace
ModuleImportTypebyExternType.
- Rename
- Add new convenience methods to
Instance:Instance::get_funcInstance::get_typed_funcInstance::get_globalInstance::get_tableInstance::get_memory
- Rename getters for querying types of runtime objects:
Func::func_type=>Func::tyGlobal::global_type=>Global::tyTable::table_type=>Table::tyMemory::memory_type=>Memory::tyValue::value_type=>Value::ty
- Remove
Global::value_typegetter.- Use
global.ty().content()instead.
- Use
- Remove
Global::is_mutablegetter.- Use
global.ty().mutability().is_mut()instead.
- Use
- Rename
Mutability::MutabletoVar. - Add
Mutability::is_mutgetter.- While this API is not included in Wasmtime it is a useful convenience method.
- Rename
TableType::initialmethod tominimum. - Rename
Table::lenmethod tosize. TableandTableTypenow operate onu32instead ofusizejust like in Wasmtime.- This affects
Table::{new, size, set, get, grow}methods andTableType::{new, minimum, maximum}methods and their users.
- This affects
- Renamed
- Add missing
TypedFunc::call_resumableAPI. (wasmi-labs#605)- So far resumable calls were only available for the
Functype. However, there was no technical reason why it was not implemented forTypedFuncso this mirrored API now exists. - This also cleans up rough edges with the
Func::call_resumableAPI.
- So far resumable calls were only available for the
- Clean up the
wasmi_corecrate API. (wasmi-labs#607, wasmi-labs#608, wasmi-labs#609)- This removes plenty of traits from the public interface of the crate which greatly simplifies the API surface for users.
- The
UntypedValuetype gained some new methods to replace functionality that was provided in parts by the removed traits.
- The Wasmi crate now follows the Wasmtime API a bit more closely. (wasmi-labs#613)
StoreContextnew methods:fn engine(&self) -> &Enginefn data(&self) -> &T
StoreContextMutnew methods:fn engine(&self) -> &Enginefn data(&self) -> &Tfn data_mut(&mut self) -> &mut T
- Renamed
Store::statemethod toStore::data. - Renamed
Store::state_mutmethod toStore::data_mut. - Renamed
Store::into_statemethod toStore::into_data.
- The
StoreandEnginetypes are better decoupled from their generic parts. (wasmi-labs#610, wasmi-labs#611)- This might reduce binary bloat and may have positive effects on the performance. In fact we measured significant performance improvements on the Wasm target.
- Add support for resumable function calls. (wasmi-labs#598)
- This feature allows to resume a function call upon encountering a host trap.
- Add support for concurrently running function executions using a single Wasmi engine.
- This feature also allows to call Wasm functions from host functions. (wasmi-labs#590)
- Add initial naive WASI support for Wasmi using the new
wasmi_wasicrate. (wasmi-labs#557)- Special thanks to Onigbinde Oluwamuyiwa Elijah for carrying the WASI support efforts!
- Also thanks to Yuyi Wang for testing and improving initial WASI support. (wasmi-labs#592, wasmi-labs#571, wasmi-labs#568)
- Note: There is ongoing work to integrate WASI support in
wasmi_cliso that the Wasmi CLI will then be able to execute arbitrarywasm-wasifiles out of the box in the future.
- Add
Module::importsthat allows to query Wasm module imports. (wasmi-labs#573, wasmi-labs#583)
- Fix a bug that imported linear memories and tables were initialized twice upon instantiation. (wasmi-labs#593)
- The Wasmi CLI now properly hints for file path arguments. (wasmi-labs#596)
- The
wasmi::Traptype is now more similar to Wasmtime'sTraptype. (wasmi-labs#559) - The
wasmi::Storetype is nowSendandSyncas intended. (wasmi-labs#566) - The Wasmi CLI now prints exported functions names if the function name CLI argument is missing. (wasmi-labs#579)
- Improve feedback when running a Wasm module without exported function using Wasmi CLI. (wasmi-labs#584)
- Contribution documentation about fuzz testing. (wasmi-labs#529)
- Removed some deprecated functions in the
wasmi_corecrate. (wasmi-labs#545)
- Fixed a critical performance regression introduced in Rust 1.65. (wasmi-labs#518)
- While the PR's main job was to clean up some code it was found out that it also fixes a critical performance regression introduced in Rust 1.65.
- You can read more about this performance regression in this thread.
- Fixed handling of edge cases with respect to Wasm linear memory. (wasmi-labs#449)
- This allows for Wasmi to properly setup and use linear memory instances of up to 4GB.
- Optimize and improve Wasm instantiation. (wasmi-labs#531)
- Optimize
global.getof immutable non-imported globals. (wasmi-labs#533)- Also added a benchmark test for this. (wasmi-labs#532)
- Implemented miscellaneous improvements to our CI system.
- wasmi-labs#539 (and more)
- Miscellaneous clean ups in
wasmi_coreand Wasmi's executor.
- Fixed a potential undefined behavior as reported by the
miritool with respect to its experimental stacked borrows. (wasmi-labs#524)
- Optimized Wasm to Wasmi translation phase by removing unnecessary Wasm
validation type checks. (wasmi-labs#527)
- Speedups were in the range of 15%.
Linker::instantiatenow takes&selfinstead of&mut self. (wasmi-labs#512)- This allows users to easily predefine a linker and reused its definitions as shared resource.
- Fixed a bug were
Caller::newwas public. (wasmi-labs#514)- It is now a private method as it was meant to be.
- Optimized
TypedFunc::callat slight cost ofFunc::call. (wasmi-labs#522)- For many parameters and return values the measured improvements are in the range of 25%. Note that this is only significant for a large amount of host to Wasm calls of small functions.
- Added new benchmarks and cleaned up benchmarking code in general.
- Add
miritesting to Wasmi CI (wasmi-labs#523)
- Optimize for common cases for branch and return instructions.
(wasmi-labs#493)
- This led to up to 10% performance improvement according to our benchmarks in some cases.
- Removed extraneous
S: impl AsContextgeneric parameter fromFunc::typedmethod. - Make
IntoFunc,WasmTypeandWasmRettraits publicly available. - Add missing impl for
WasmRetforResult<T, Trap> where T: WasmType.- Without this impl it was impossible to provide closures to
Func::wrapthat returnedResult<T, Trap>whereT: WasmType, onlyResult<(), Trap>orResult<(T,), Trap>was possible before.
- Without this impl it was impossible to provide closures to
- Added
wasmi_arenacrate which defines all internally used arena data structures. (wasmi-labs#502) - Update to
clap 4.0inwasmi_cli. (wasmi-labs#498) - Many more improvements to our internal benchmarking CI. (wasmi-labs#494, wasmi-labs#501, wasmi-labs#506, wasmi-labs#509)
- Added Contibution Guidelines and Code of Conduct to the repository. (wasmi-labs#485)
- Optimized instruction dispatch in the Wasmi interpreter.
(wasmi-labs#478, wasmi-labs#482)
- This yielded combined speed-ups of ~20% across the board.
- As a side effect we also refactored the way we compute branching offsets at Wasm module compilation time which improved performance of Wasm module compilation by roughly 5%.
- Our CI now also benchmarks Wasmi when ran inside Wasmtime as Wasm.
(wasmi-labs#483, wasmi-labs#487)
- This allows us to optimize Wasmi towards Wasm performance more easily in the future.
- Added
Memory::data_and_store_mutAPI inspired by Wasmtime's API. (wasmi-labs#448)
- Updated
wasmparser-nostddependency from0.90.0to0.91.0.- This improved performance of Wasm module compilation by ~10%.
- Updated
wasmi_corefrom0.3.0to0.4.0. - Optimized execution of several Wasm float to int conversion instructions. (wasmi-labs#439)
- We measured a performance improvement of 6000% or in other words those instructions are now 60 times faster than before.
- This allowed us to remove the big
num-rationaldependency fromwasmi_corefor some nice speed-ups in compilation time of Wasmi itself.
- Optimized
global.getandglobal.setWasm instruction execution. (wasmi-labs#427)- This improved performance of those instructions by up to 17%.
- Optimized Wasm value stack emulation. (wasmi-labs#459)
- This improved performance of compute intense workloads by up to 23%.
- Added automated continuous benchmarking to Wasmi. (wasmi-labs#422)
- This allows us to have a more consistent overview over the performance of Wasmi.
- Updated
criterionbenchmarking framework to version0.4.0. - Reuse allocations during Wasm validation and translation:
- Wasm validation and translation combined. (wasmi-labs#462)
- Wasm
br_tabletranslations. (wasmi-labs#440)
- Enabled more useful
clippylints for Wasmi andwasmi_core. (wasmi-labs#438) - Reorganized the Wasmi workspace. (wasmi-labs#466)
- Update
wasmparser-nostddependency from version0.83.0->0.90.0. Link:- This significantly improved Wasmi's Wasm parsing, validation and Wasm to Wasmi bytecode translation performance.
- Transition to the new
wasmparser::VisitOperatorAPI. Link- This again significantly improved Wasmi's Wasm parsing, validation and Wasm to Wasmi bytecode translation performance by avoiding many unnecessary unpredictable branches in the process.
- Fixed bugs found during fuzzing the translation phase of Wasmi. Link
- Fix
Readtrait implementation forno_stdcompilations. Link
- Update to
wasmi_coreversion0.3.0. - Changed API of
wasmi::Configin order to better reflect the API ofwasmtime::Config. - Refactor
Traptype to be of pointer size which resulted in significant performance wins across the board especially for call intense work loads. Link
- Removed support for virtual memory based Wasm linear memory.
We decided to remove support since benchmarks showed that our current
implementation actually regresses performance compared to our naive
Vecbased implementation. Link
- The
wasmi::Enginenow caches the bytes of the default linear memory for performance wins inmemory.storeandmemory.loadintense work loads. Link - The Wasmi engine internals have been reorganized and modernised to improve performance on function call intense work loads. This resulted in performance improvements across the board. Link
- The Wasm to Wasmi bytecode translation now properly reuses heap allocations across function translation units which improved translation performance by roughly 10%. Link
- Optimized the Wasmi engine Wasm value stack implementation for significant performance wins across the board. Link
- Shrunk size of some internal identifier types for minor performance wins. Link
- Added initial naive fuzz testing for Wasm parsing, validation and Wasm to Wasmi bytecode translation. Link
-
Added support for the following Wasm proposals:
- Import and export of mutable globals
- Non-trapping float-to-int conversions
- Sign-extension operators
- Multi-value
We plan to support more Wasm proposals in the future.
-
Wasmi has been entirely redesigned and reimplemented. This work resulted in an entirely new API that is heavily inspired by the Wasmtime API, a brand new Wasm execution engine that performs roughly 30-40% better than the previous engine according to our benchmarks, the support of many Wasm proposals and Wasm parsing and validation using the battle tested
wasmparsercrate by the BytecodeAlliance.The new Wasmi design allows to reuse the Wasm execution engine resources instead of spinning up a new Wasm execution engine for every function call.
Note: If you plan to use Wasmi it is of critical importance to compile Wasmi using the following Cargo
profilesettings:[profile.release] lto = "fat" codegen-units = 1
If you do not use these profile settings you might risk regressing performance of Wasmi by up to 400%. You can read more about this issue here.
- Removed support for resuming function execution. We may consider to add this feature back into the new engine. If you are a user of Wasmi and want this feature please feel free to open an issue and provide us with your use case.
- Support allocating 4GB of memory (wasmi-labs#452)
Note: Yanked because of missing wasmi_core bump.
Note: This is the last major release of the legacy Wasmi engine.
Future releases are using the new Wasm execution engines
that are currently in development.
We may consider to publish new major versions of this Wasm engine
as wasmi-legacy crate.
- Update dependency:
wasmi-validation v0.4.2 -> v0.5.0
- Wasmi now depends on the
wasmi_corecrate. - Deprecated
RuntimeValue::decode_{f32,f64}methods.- Reason: These methods expose details about the
F32andF64types. TheRuntimeValuetype providesfrom_bitsmethods for similar purposes. - Replacement: Replace those deprecated methods with
F{32,64}::from_bits().into()respectively.
- Reason: These methods expose details about the
- Refactor traps in Wasmi: PR
- This change also renames
TrapKindtoTrapCode. - The Wasmi crate now properly reuses the
TrapCodedefinitions from thewasmi_corecrate.
- This change also renames
- Updated dependency:
parity-wasm v0.42 -> v0.45memory_units v0.3.0 -> v0.4.0
- Rename
RuntimeValuetoValueinternally. - Now uses
watcrate dependency instead ofwabtfor reading.watfiles in tests. - Updated dev-dependencies:
assert_matches: v1.1 -> v1.5rand 0.4.2 -> 0.8.2
- Fix some
clippywarnings.
- Make Wasmi traps more conformant with the Wasm specification. (wasmi-labs#300)
- Fixed a bug in
{f32, f64}_copysignimplementations. (wasmi-labs#293) - Fixed a bug in
{f32, f64}_{min, max}implementations. (wasmi-labs#295)
- Optimized Wasm to host calls. (wasmi-labs#291)
- In some artificial benchmarks we saw improvements of up to 42%!
- Introduce a more efficient
LittleEndianConverttrait. (wasmi-labs#290)
- Refactor and clean up benchmarking code and added more benchmarks.
- Apply some clippy suggestions with respect ot
#[must_use]. (wasmi-labs#288) - Improve Rust code formatting of imports.
- Improve debug impl of
ValueStackso that only the live parts are printed.
- Support for virtual memory usage on Windows 64-bit platforms.
- Technically we now support the same set of platforms as the
regioncrate does: https://github.com/darfink/region-rs#platforms
- Technically we now support the same set of platforms as the
- The Wasmi and
wasmi-validationcrates now both use Rust edition 2021. - The
READMEnow better teaches how to test and benchmark the crate. - Updated
num-rationalfrom version0.2.2->0.4.0.
- Deprecated
MemoryInstance::getmethod.- Users are recommended to use
MemoryInstance::get_valueorMemoryInstance::get_intomethods instead.
- Users are recommended to use
- Removed support for virtual memory on 32-bit platforms.
- Note that the existing support was supposedly not more efficient than the
Vecbased fallback implementation anyways due to technical design.
- Note that the existing support was supposedly not more efficient than the
- Removed the
corecrate feature that previously has been required forno_stdbuilds.- Now users only have to specify
--no-default-featuresfor ano_stdbuild.
- Now users only have to specify
- Fully deploy GitHub Actions CI and remove deprecated Travis based CI. Added CI jobs for:
- Testing on Linux, MacOS and Windows
- Checking docs and dead links in docs.
- Audit crate dependencies for vulnerabilities.
- Check Wasm builds.
- File test coverage reports to codecov.io.
- Added possibility to forward
reduced_stack_bufferscrate feature toparity-wasmcrate.
- Added a default
rustfmt.tomlconfiguration file. - Fixed some warnings associated to Rust edition 2021.
- Note: The crate itself remains in Rust edition 2018.
- Updated
parity-wasmfrom verion0.41to0.42. - Bumped
wasmi-validationfrom version0.3.1to0.4.0.