dependabot[bot] bee3aebeef Update wasmi requirement from 0.21 to 0.22 (#44)
Updates the requirements on [wasmi](https://github.com/paritytech/wasmi)
to permit the latest version.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/paritytech/wasmi/releases">wasmi's
releases</a>.</em></p>
<blockquote>
<h2>v0.22.0 - 2023-01-16</h2>
<h3>Added</h3>
<ul>
<li>Add missing <code>TypedFunc::call_resumable</code> API. (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/605">paritytech/wasmi#605</a>)
<ul>
<li>So far resumable calls were only available for the <code>Func</code>
type.
However, there was no technical reason why it was not implemented
for <code>TypedFunc</code> so this mirrored API now exists.</li>
<li>This also cleans up rough edges with the
<code>Func::call_resumable</code> API.</li>
</ul>
</li>
</ul>
<h3>Changed</h3>
<ul>
<li>Clean up the <code>wasmi_core</code> crate API. (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/607">paritytech/wasmi#607</a>,
<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/608">paritytech/wasmi#608</a>,
<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/609">paritytech/wasmi#609</a>)
<ul>
<li>This removes plenty of traits from the public interface of the crate
which greatly simplifies the API surface for users.</li>
<li>The <code>UntypedValue</code> type gained some new methods to
replace functionality
that was provided in parts by the removed traits.</li>
</ul>
</li>
<li>The <code>wasmi</code> crate now follows the Wasmtime API a bit more
closely. (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/613">paritytech/wasmi#613</a>)</li>
</ul>
<h3>Internal</h3>
<ul>
<li>The <code>Store</code> and <code>Engine</code> types are better
decoupled from their generic parts. (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/610">paritytech/wasmi#610</a>,
<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/611">paritytech/wasmi#611</a>)
<ul>
<li>This might reduce binary bloat and may have positive effects on the
performance.
In fact we measured significant performance improvements on the Wasm
target.</li>
</ul>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/paritytech/wasmi/blob/master/CHANGELOG.md">wasmi's
changelog</a>.</em></p>
<blockquote>
<h2>[<code>0.22.0</code>] - 2023-01-16</h2>
<h3>Added</h3>
<ul>
<li>Add missing <code>TypedFunc::call_resumable</code> API. (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/605">paritytech/wasmi#605</a>)
<ul>
<li>So far resumable calls were only available for the <code>Func</code>
type.
However, there was no technical reason why it was not implemented
for <code>TypedFunc</code> so this mirrored API now exists.</li>
<li>This also cleans up rough edges with the
<code>Func::call_resumable</code> API.</li>
</ul>
</li>
</ul>
<h3>Changed</h3>
<ul>
<li>Clean up the <code>wasmi_core</code> crate API. (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/607">paritytech/wasmi#607</a>,
<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/608">paritytech/wasmi#608</a>,
<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/609">paritytech/wasmi#609</a>)
<ul>
<li>This removes plenty of traits from the public interface of the crate
which greatly simplifies the API surface for users.</li>
<li>The <code>UntypedValue</code> type gained some new methods to
replace functionality
that was provided in parts by the removed traits.</li>
</ul>
</li>
<li>The <code>wasmi</code> crate now follows the Wasmtime API a bit more
closely. (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/613">paritytech/wasmi#613</a>)</li>
</ul>
<h3>Internal</h3>
<ul>
<li>The <code>Store</code> and <code>Engine</code> types are better
decoupled from their generic parts. (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/610">paritytech/wasmi#610</a>,
<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/611">paritytech/wasmi#611</a>)
<ul>
<li>This might reduce binary bloat and may have positive effects on the
performance.
In fact we measured significant performance improvements on the Wasm
target.</li>
</ul>
</li>
</ul>
<h2>[<code>0.21.0</code>] - 2023-01-04</h2>
<h3>Added</h3>
<ul>
<li>Add support for resumable function calls. (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/598">paritytech/wasmi#598</a>)
<ul>
<li>This feature allows to resume a function call upon encountering a
host trap.</li>
</ul>
</li>
<li>Add support for concurrently running function executions using a
single <code>wasmi</code> engine.
<ul>
<li>This feature also allows to call Wasm functions from host functions.
(<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/590">paritytech/wasmi#590</a>)</li>
</ul>
</li>
<li>Add initial naive WASI support for <code>wasmi</code> using the new
<code>wasmi_wasi</code> crate. (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/557">paritytech/wasmi#557</a>)
<ul>
<li>Special thanks to <a href="https://github.com/OLUWAMUYIWA">Onigbinde
Oluwamuyiwa Elijah</a> for carrying the WASI support efforts!</li>
<li>Also thanks to <a href="https://github.com/Berrysoft">Yuyi Wang</a>
for testing and improving initial WASI support. (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/592">paritytech/wasmi#592</a>,
<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/571">paritytech/wasmi#571</a>,
<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/568">paritytech/wasmi#568</a>)</li>
<li><strong>Note:</strong> There is ongoing work to integrate WASI
support in <code>wasmi_cli</code> so that the <code>wasmi</code> CLI
will then
be able to execute arbitrary <code>wasm-wasi</code> files out of the box
in the future.</li>
</ul>
</li>
<li>Add <code>Module::imports</code> that allows to query Wasm module
imports. (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/573">paritytech/wasmi#573</a>,
<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/583">paritytech/wasmi#583</a>)</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>Fix a bug that imported linear memories and tables were initialized
twice upon instantiation. (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/593">paritytech/wasmi#593</a>)</li>
<li>The <code>wasmi</code> CLI now properly hints for file path
arguments. (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/596">paritytech/wasmi#596</a>)</li>
</ul>
<h3>Changed</h3>
<ul>
<li>The <code>wasmi::Trap</code> type is now more similar to Wasmtime's
<code>Trap</code> type. (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/559">paritytech/wasmi#559</a>)</li>
<li>The <code>wasmi::Store</code> type is now <code>Send</code> and
<code>Sync</code> as intended. (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/566">paritytech/wasmi#566</a>)</li>
<li>The <code>wasmi</code> CLI now prints exported functions names if
the function name CLI argument is missing. (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/579">paritytech/wasmi#579</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/paritytech/wasmi/commit/0bbb80cc8063ba7cb5a25f2047b21990564e87fe"><code>0bbb80c</code></a>
Prepare for release of <code>wasmi</code> <code>v0.22.0</code> (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/issues/614">#614</a>)</li>
<li><a
href="https://github.com/paritytech/wasmi/commit/7c16e7793553a132b7d7b4f53fb20209eafeffa2"><code>7c16e77</code></a>
Mirror Wasmtime APIs more closely (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/issues/613">#613</a>)</li>
<li><a
href="https://github.com/paritytech/wasmi/commit/1a5891aa8716c4ffea01a98ca204267ae95d79c2"><code>1a5891a</code></a>
Add tests for <code>ComponentVec</code> data structure (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/issues/612">#612</a>)</li>
<li><a
href="https://github.com/paritytech/wasmi/commit/2d139d76ce48a01ef0cb69330dae97468ff6fda5"><code>2d139d7</code></a>
Make <code>Engine</code>'s executor use <code>&amp;mut StoreInner</code>
(making it non-generic) (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/issues/611">#611</a>)</li>
<li><a
href="https://github.com/paritytech/wasmi/commit/702cc6872aa19cd0067a18e5620ec05ca1dfdf73"><code>702cc68</code></a>
Create a non-generic <code>StoreInner</code> (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/issues/610">#610</a>)</li>
<li><a
href="https://github.com/paritytech/wasmi/commit/cc05d72465cff368b2b09f76c84fe23bfa186b68"><code>cc05d72</code></a>
No longer re-export unused traits from <code>wasmi_core</code> (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/issues/609">#609</a>)</li>
<li><a
href="https://github.com/paritytech/wasmi/commit/f4aabf3e10ffa72659b663e791f77fe39aa0c9ba"><code>f4aabf3</code></a>
Add Wasm load and store API to <code>UntypedValue</code> (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/issues/608">#608</a>)</li>
<li><a
href="https://github.com/paritytech/wasmi/commit/d2069ce5378b931847b591fd1430dc8a0657eda7"><code>d2069ce</code></a>
Cleanup <code>wasmi_core</code> crate (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/issues/607">#607</a>)</li>
<li><a
href="https://github.com/paritytech/wasmi/commit/0d12bffda0bc22affc26d499f3bfbbd7be1f17f7"><code>0d12bff</code></a>
Refactor resumable function call tests (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/issues/606">#606</a>)</li>
<li><a
href="https://github.com/paritytech/wasmi/commit/7753fab3484678fed7ad72dd0005440987f610fa"><code>7753fab</code></a>
Implement resumable calls for <code>TypedFunc</code> (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/issues/605">#605</a>)</li>
<li>See full diff in <a
href="https://github.com/paritytech/wasmi/compare/v0.21.0...v0.22.0">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-01-17 06:43:26 -03:00
2023-01-10 16:01:52 -03:00
2021-07-28 16:29:33 +02:00
2017-11-03 02:11:41 +03:00
2022-01-11 21:46:18 +02:00

wasm-instrument

A Rust library containing a collection of wasm module instrumentations and transformations mainly useful for wasm based block chains and smart contracts.

Provided functionality

This is a non exhaustive list of provided functionality. Please check out the documentation for details.

Gas Metering

Add gas metering to your platform by injecting the necessary code directly into the wasm module. This allows having a uniform gas metering implementation across different execution engines (interpreters, JIT compilers).

Stack Height Limiter

Neither the wasm standard nor any sufficiently complex execution engine specifies how many items on the wasm stack are supported before the execution aborts or malfunctions. Even the same execution engine on different operating systems or host architectures could support a different number of stack items and be well within its rights.

This is the kind of indeterminism that can lead to consensus failures when used in a blockchain context.

To address this issue we can inject some code that meters the stack height at runtime and aborts the execution when it reaches a predefined limit. Choosing this limit suffciently small so that it is smaller than what any reasonably parameterized execution engine would support solves the issue: All execution engines would reach the injected limit before hitting any implementation specific limitation.

License

wasm-instrument is distributed under the terms of both the MIT license and the Apache License (Version 2.0), at your choice.

See LICENSE-APACHE, and LICENSE-MIT for details.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in wasm-instrument by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

S
Description
No description provided
Readme 1.1 MiB
Languages
Rust 85.7%
WebAssembly 13.9%
Just 0.4%