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 show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@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>
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 show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@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>
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 show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@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>
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 show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@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>
Updates the requirements on
[wasmparser](https://github.com/bytecodealliance/wasm-tools) to permit
the latest version.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/bytecodealliance/wasm-tools/commits">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 show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@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>
Updates the requirements on
[wasmprinter](https://github.com/bytecodealliance/wasm-tools) to permit
the latest version.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/bytecodealliance/wasm-tools/commits">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 show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@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>
Updates the requirements on
[criterion](https://github.com/bheisler/criterion.rs) to permit the
latest version.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/bheisler/criterion.rs/blob/master/CHANGELOG.md">criterion's
changelog</a>.</em></p>
<blockquote>
<h2>[0.5.0] - 2023-05-23</h2>
<h3>Changed</h3>
<ul>
<li>Replaced lazy_static dependency with once_cell</li>
<li>Improved documentation of the <code>html_reports</code> feature</li>
<li>Replaced atty dependency with is-terminal</li>
<li>MSRV bumped to 1.64</li>
<li>Upgraded clap dependency to v4</li>
<li>Upgraded tempfile dependency to v3.5.0</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>Quick mode (<code>--quick</code>) no longer outputs 1ms for measured
times over 5 seconds</li>
<li>Documentation updates</li>
</ul>
<h2>[0.4.0] - 2022-09-10</h2>
<h3>Removed</h3>
<ul>
<li>The <code>Criterion::can_plot</code> function has been removed.</li>
<li>The <code>Criterion::bench_function_over_inputs</code> function has
been removed.</li>
<li>The <code>Criterion::bench_functions</code> function has been
removed.</li>
<li>The <code>Criterion::bench</code> function has been removed.</li>
</ul>
<h3>Changed</h3>
<ul>
<li>HTML report hidden behind non-default feature flag:
'html_reports'</li>
<li>Standalone support (ie without cargo-criterion) feature flag:
'cargo_bench_support'</li>
<li>MSRV bumped to 1.57</li>
<li><code>rayon</code> and <code>plotters</code> are optional (and
default) dependencies.</li>
<li>Status messages ('warming up', 'analyzing', etc) are printed to
stderr, benchmark results are printed to stdout.</li>
<li>Accept subsecond durations for <code>--warm-up-time</code>,
<code>--measurement-time</code> and <code>--profile-time</code>.</li>
<li>Replaced serde_cbor with ciborium because the former is no longer
maintained.</li>
<li>Upgrade clap to v3 and regex to v1.5.</li>
</ul>
<h3>Added</h3>
<ul>
<li>A <code>--discard-baseline</code> flag for discarding rather than
saving benchmark results.</li>
<li>Formal support for benchmarking code compiled to web-assembly.</li>
<li>A <code>--quiet</code> flag for printing just a single line per
benchmark.</li>
<li>A <code>Throughput::BytesDecimal</code> option for measuring
throughput in bytes but printing them using
decimal units like kilobytes instead of binary units like
kibibytes.</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>When using <code>bench_with_input</code>, the input parameter will
now be passed through <code>black_box</code> before
passing it to the benchmark.</li>
</ul>
<h2>[0.3.6] - 2022-07-06</h2>
<h3>Changed</h3>
<ul>
<li>MSRV bumped to 1.49</li>
<li>Symbol for microseconds changed from ASCII 'us' to unicode 'µs'</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/bheisler/criterion.rs/commit/4a560cb8d8b4cefc4819a6489f0ce0540663968d"><code>4a560cb</code></a>
release version 0.5 (<a
href="https://redirect.github.com/bheisler/criterion.rs/issues/683">#683</a>)</li>
<li><a
href="https://github.com/bheisler/criterion.rs/commit/3e2849ebf86e27507f783a20647a0fc81c6bfcc7"><code>3e2849e</code></a>
Post v0.4 CHANGELOG updates (<a
href="https://redirect.github.com/bheisler/criterion.rs/issues/680">#680</a>)</li>
<li><a
href="https://github.com/bheisler/criterion.rs/commit/637010e50d3819839cd45d9f5b281c169573416a"><code>637010e</code></a>
Bump clap to version 4 (<a
href="https://redirect.github.com/bheisler/criterion.rs/issues/679">#679</a>)</li>
<li><a
href="https://github.com/bheisler/criterion.rs/commit/39d7e2f9546981d87ae195fe7c68f778afdb66a4"><code>39d7e2f</code></a>
Update to tempfile 3.5 (<a
href="https://redirect.github.com/bheisler/criterion.rs/issues/675">#675</a>)</li>
<li><a
href="https://github.com/bheisler/criterion.rs/commit/8ab2752ccfeece50347c81866a4185f29fd978a2"><code>8ab2752</code></a>
Fix typo in known_limitations.md (<a
href="https://redirect.github.com/bheisler/criterion.rs/issues/674">#674</a>)</li>
<li><a
href="https://github.com/bheisler/criterion.rs/commit/a2112308ef8e3d8fe5a8da41ccb0fba3d5d460c4"><code>a211230</code></a>
chore: replace atty with is-terminal (<a
href="https://redirect.github.com/bheisler/criterion.rs/issues/628">#628</a>)</li>
<li><a
href="https://github.com/bheisler/criterion.rs/commit/a844eb226bb814e6a4e8b35b3b91c74f22ad535b"><code>a844eb2</code></a>
Bump MSRV to 1.60 for csv dependency (<a
href="https://redirect.github.com/bheisler/criterion.rs/issues/665">#665</a>)</li>
<li><a
href="https://github.com/bheisler/criterion.rs/commit/2f5360737807cbe90d149db6199783236f0ef634"><code>2f53607</code></a>
Use OR operator to specify multiple licenses (<a
href="https://redirect.github.com/bheisler/criterion.rs/issues/643">#643</a>)</li>
<li><a
href="https://github.com/bheisler/criterion.rs/commit/86dcd7d323799043c100dbf358409e986a872a11"><code>86dcd7d</code></a>
Fix bug where time over the maximum would be reported as 1ms in quick
mode. (...</li>
<li><a
href="https://github.com/bheisler/criterion.rs/commit/2942aee124e433213f0e9b917bb730bcdc7df6f3"><code>2942aee</code></a>
Remove unnecessary <code>pub</code> from example code (<a
href="https://redirect.github.com/bheisler/criterion.rs/issues/657">#657</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/bheisler/criterion.rs/compare/0.4.0...0.5.0">compare
view</a></li>
</ul>
</details>
<br />
You can trigger a rebase of this PR 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>
> **Note**
> Automatic rebases have been disabled on this pull request as it has
been open for over 30 days.
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
btw `#[cfg(...)]` was used implicitly and expanded always lead to `use
alloc::collections::BTreeMap as Map;`
the second `cfg(std)` just doesn't work bcz `featureS`
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.31.0 - 2023-07-31</h2>
<h3>Added</h3>
<ul>
<li>Added <code>ResourceLimiter</code> API known from Wasmtime. (<a
href="https://redirect.github.com/paritytech/wasmi/pull/737">paritytech/wasmi#737</a>)
<ul>
<li>This API allows to limit growable Wasm resources such as Wasm tables
and linear memories.</li>
<li>Special thanks to <a href="https://github.com/graydon">Graydon
Hoare</a> for contributing this feature!</li>
</ul>
</li>
</ul>
<h3>Fixes</h3>
<ul>
<li>Fixed a bug were <code>Module::len_globals</code> internal API
returned length of linear memories instead. (<a
href="https://redirect.github.com/paritytech/wasmi/pull/741">paritytech/wasmi#741</a>)</li>
</ul>
<h3>Changed</h3>
<ul>
<li>Removed <code>intx</code> crate dependency. (<a
href="https://redirect.github.com/paritytech/wasmi/pull/727">paritytech/wasmi#727</a>)
<ul>
<li>The dependence on the <code>intx</code> crate was accidental and not
really required at any time.</li>
</ul>
</li>
<li>Optimized <code>f64.const</code> instructions for <code>f64</code>
constant values that can losslessly be encoded as 32-bit
<code>f32</code> value. (<a
href="https://redirect.github.com/paritytech/wasmi/pull/746">paritytech/wasmi#746</a>)</li>
</ul>
<h3>Dev. Note</h3>
<ul>
<li>We now publish and record graphs of benchmarks over time. (<a
href="https://redirect.github.com/paritytech/wasmi/pull/740">paritytech/wasmi#740</a>)
<ul>
<li>This allows <code>wasmi</code> developers to better inspect
performance changes over longer periods of time.</li>
</ul>
</li>
<li>Updated dev. dependencies:
<ul>
<li><code>criterion 0.4.0</code> -> <code>0.5.0</code></li>
<li><code>wast 0.52.0</code> -> <code>0.62.0</code></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.31.0</code>] - 2023-07-31</h2>
<h3>Added</h3>
<ul>
<li>Added <code>ResourceLimiter</code> API known from Wasmtime. (<a
href="https://redirect.github.com/paritytech/wasmi/pull/737">paritytech/wasmi#737</a>)
<ul>
<li>This API allows to limit growable Wasm resources such as Wasm tables
and linear memories.</li>
<li>Special thanks to <a href="https://github.com/graydon">Graydon
Hoare</a> for contributing this feature!</li>
</ul>
</li>
</ul>
<h3>Fixes</h3>
<ul>
<li>Fixed a bug were <code>Module::len_globals</code> internal API
returned length of linear memories instead. (<a
href="https://redirect.github.com/paritytech/wasmi/pull/741">paritytech/wasmi#741</a>)</li>
</ul>
<h3>Changed</h3>
<ul>
<li>Removed <code>intx</code> crate dependency. (<a
href="https://redirect.github.com/paritytech/wasmi/pull/727">paritytech/wasmi#727</a>)
<ul>
<li>The dependence on the <code>intx</code> crate was accidental and not
really required at any time.</li>
</ul>
</li>
<li>Optimized <code>f64.const</code> instructions for <code>f64</code>
constant values that can losslessly be encoded as 32-bit
<code>f32</code> value. (<a
href="https://redirect.github.com/paritytech/wasmi/pull/746">paritytech/wasmi#746</a>)</li>
</ul>
<h3>Dev. Note</h3>
<ul>
<li>We now publish and record graphs of benchmarks over time. (<a
href="https://redirect.github.com/paritytech/wasmi/pull/740">paritytech/wasmi#740</a>)
<ul>
<li>This allows <code>wasmi</code> developers to better inspect
performance changes over longer periods of time.</li>
</ul>
</li>
<li>Updated dev. dependencies:
<ul>
<li><code>criterion 0.4.0</code> -> <code>0.5.0</code></li>
<li><code>wast 0.52.0</code> -> <code>0.62.0</code></li>
</ul>
</li>
</ul>
<h2>[<code>0.30.0</code>] - 2023-05-28</h2>
<h3>Changed</h3>
<ul>
<li>Optimized <code>wasmi</code> bytecode memory consumption. (<a
href="https://redirect.github.com/paritytech/wasmi/pull/718">paritytech/wasmi#718</a>)
<ul>
<li>This reduced the memory consumption of <code>wasmi</code> bytecode
by organizing the instructions
into so-called instruction words, effectively reducing the amount of
bytes required per
<code>wasmi</code> 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 <code>wasmi</code> execution and translation
performance.</li>
<li>This did not affect execution performance too much but we saw
performance improvements
for translation from Wasm to <code>wasmi</code> bytecode by roughly
15-20%.</li>
</ul>
</li>
<li>Optimized <code>call</code> and <code>return_call</code> for Wasm
module internal calls. (<a
href="https://redirect.github.com/paritytech/wasmi/pull/724">paritytech/wasmi#724</a>)
<ul>
<li><code>wasmi</code> bytecode now differentiates between calls to Wasm
module internal functions
and imported functions which allows the <code>wasmi</code> bytecode
executor to perform the common
internal calls more efficiently.</li>
<li>This led to an execution performance improvement across the board
but especially for
call intense workloads of up to 30% in some test cases.</li>
</ul>
</li>
</ul>
<h2>[<code>0.29.0</code>] - 2023-03-20</h2>
<h3>Added</h3>
<ul>
<li>Added support for <code>extended-const</code> Wasm proposal. (<a
href="https://redirect.github.com/paritytech/wasmi/pull/707">paritytech/wasmi#707</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/983ef37b3e2acf38a898e191c9bbbd2bc2c05da7"><code>983ef37</code></a>
Prepare <code>wasmi</code> release for version <code>0.31.0</code> (<a
href="https://redirect.github.com/paritytech/wasmi/issues/748">#748</a>)</li>
<li><a
href="https://github.com/paritytech/wasmi/commit/af8c588c9059c5299da812958d7a71dc024d2938"><code>af8c588</code></a>
Publishing benchmarks for graphs (<a
href="https://redirect.github.com/paritytech/wasmi/issues/740">#740</a>)</li>
<li><a
href="https://github.com/paritytech/wasmi/commit/ee577f268db3bc8b95c685205517c37b4800fa68"><code>ee577f2</code></a>
Refactor <code>reftype</code> <code>Transposer</code> conversion utility
(<a
href="https://redirect.github.com/paritytech/wasmi/issues/747">#747</a>)</li>
<li><a
href="https://github.com/paritytech/wasmi/commit/ed12feb9f286d13bbdce50491c4d50487319f316"><code>ed12feb</code></a>
Add <code>F64Const32</code> instruction (<a
href="https://redirect.github.com/paritytech/wasmi/issues/746">#746</a>)</li>
<li><a
href="https://github.com/paritytech/wasmi/commit/fbe1810a209f8884883333963b6d03c7421c5e5f"><code>fbe1810</code></a>
Fix <code>clippy</code> warning (<a
href="https://redirect.github.com/paritytech/wasmi/issues/745">#745</a>)</li>
<li><a
href="https://github.com/paritytech/wasmi/commit/e5fdb7fe32b9151dff6a39c8a4d516817cc72dc2"><code>e5fdb7f</code></a>
fixes <a
href="https://redirect.github.com/paritytech/wasmi/issues/735">#735</a>:
copy paste typo (<a
href="https://redirect.github.com/paritytech/wasmi/issues/741">#741</a>)</li>
<li><a
href="https://github.com/paritytech/wasmi/commit/4860ecc877a6e13a8c4924be6d8f287f126752ad"><code>4860ecc</code></a>
Support for <code>ResourceLimiter</code> API (<a
href="https://redirect.github.com/paritytech/wasmi/issues/737">#737</a>)</li>
<li><a
href="https://github.com/paritytech/wasmi/commit/799995da7afb0ae02bb4fd1c9f242fe07c7ad824"><code>799995d</code></a>
make <code>ConstRef</code> based on <code>u32</code> instead of
<code>intx::U24</code> (<a
href="https://redirect.github.com/paritytech/wasmi/issues/727">#727</a>)</li>
<li><a
href="https://github.com/paritytech/wasmi/commit/4fb164ce6b9a06af65923596711f5988384d6e13"><code>4fb164c</code></a>
Prepare release of <code>wasmi</code> version <code>0.30.0</code> (<a
href="https://redirect.github.com/paritytech/wasmi/issues/726">#726</a>)</li>
<li><a
href="https://github.com/paritytech/wasmi/commit/a6165a6ff9ad07f525b3352b0ab4442da32e0f7f"><code>a6165a6</code></a>
smol clean-up (<a
href="https://redirect.github.com/paritytech/wasmi/issues/725">#725</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/paritytech/wasmi/compare/v0.29.0...v0.31.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>
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.29.0 - 2023-03-20</h2>
<h3>Added</h3>
<ul>
<li>Added support for <code>extended-const</code> Wasm proposal. (<a
href="https://redirect.github.com/paritytech/wasmi/pull/707">paritytech/wasmi#707</a>)</li>
<li>Added fuel consumption modes. (<a
href="https://redirect.github.com/paritytech/wasmi/pull/706">paritytech/wasmi#706</a>)
<ul>
<li>This allows eager and lazy fuel consumption modes to be used which
mainly affects bulk operations such as <code>table.copy</code> and
<code>memory.grow</code>.
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.</li>
</ul>
</li>
</ul>
<h3>Changed</h3>
<ul>
<li>Normalize fuel costs of all instructions. (<a
href="https://redirect.github.com/paritytech/wasmi/pull/705">paritytech/wasmi#705</a>)
<ul>
<li>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 <code>wasmi</code> tried to have fuel costs that more
closely mirror
the computation intensity of the respective instruction according to
benchmarks.</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.29.0</code>] - 2023-03-20</h2>
<h3>Added</h3>
<ul>
<li>Added support for <code>extended-const</code> Wasm proposal. (<a
href="https://redirect.github.com/paritytech/wasmi/pull/707">paritytech/wasmi#707</a>)</li>
<li>Added fuel consumption modes. (<a
href="https://redirect.github.com/paritytech/wasmi/pull/706">paritytech/wasmi#706</a>)
<ul>
<li>This allows eager and lazy fuel consumption modes to be used which
mainly affects bulk operations such as <code>table.copy</code> and
<code>memory.grow</code>.
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.</li>
</ul>
</li>
</ul>
<h3>Changed</h3>
<ul>
<li>Normalize fuel costs of all instructions. (<a
href="https://redirect.github.com/paritytech/wasmi/pull/705">paritytech/wasmi#705</a>)
<ul>
<li>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 <code>wasmi</code> tried to have fuel costs that more
closely mirror
the computation intensity of the respective instruction according to
benchmarks.</li>
</ul>
</li>
</ul>
<h2>[<code>0.28.0</code>] - 2023-03-01</h2>
<h3>Added</h3>
<ul>
<li>Added support for the <code>tail-call</code> Wasm proposal. (<a
href="https://redirect.github.com/paritytech/wasmi/pull/683">paritytech/wasmi#683</a>)</li>
<li>Added support for <code>Linker</code> defined host functions. (<a
href="https://redirect.github.com/paritytech/wasmi/pull/692">paritytech/wasmi#692</a>)
<ul>
<li>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.</li>
<li>Required precursor refactoring PR: <a
href="https://redirect.github.com/paritytech/wasmi/pull/681">paritytech/wasmi#681</a></li>
</ul>
</li>
</ul>
<h3>Changed</h3>
<ul>
<li>The <code>wasmi_wasi</code> crate now more closely mirrors the
<code>wasmtime_wasi</code> crate API. (<a
href="https://redirect.github.com/paritytech/wasmi/pull/700">paritytech/wasmi#700</a>)</li>
</ul>
<h3>Internal</h3>
<ul>
<li>Refactor the <code>wasmi</code> Wasm engine to handle Wasm calls and
returns in its core. [(<a
href="https://redirect.github.com/paritytech/wasmi/issues/694">#694</a>)]
<ul>
<li>This improved performance of Wasm function calls significantly at
the cost of host function call performance.</li>
<li>Also this seemed to have impacts Wasm target performance quite
positively, too.</li>
</ul>
</li>
<li>The <code>Store</code> now handles Wasm functions and host functions
separately. (<a
href="https://redirect.github.com/paritytech/wasmi/pull/686">paritytech/wasmi#686</a>)
<ul>
<li>This allows to store Wasm functions into the <code>StoreInner</code>
type which was an important
step towards the major refactoring in [(<a
href="https://redirect.github.com/paritytech/wasmi/issues/694">#694</a>)]</li>
<li>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.</li>
</ul>
</li>
<li>Introduce <code>ValueStackPtr</code> abstraction for the
<code>wasmi</code> engine core. (<a
href="https://redirect.github.com/paritytech/wasmi/pull/688">paritytech/wasmi#688</a>)
<ul>
<li>This change significantly improved performance especially on the
Wasm target according to our tests.</li>
</ul>
</li>
<li>Optimize <code>memory.{load,store}</code> when reading or writing
single bytes. (<a
href="https://redirect.github.com/paritytech/wasmi/pull/689">paritytech/wasmi#689</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/23d8d8c684255f2d63526baa348ab3eb3d249de0"><code>23d8d8c</code></a>
Prepare <code>wasmi</code> release of version <code>0.29.0</code> (<a
href="https://redirect.github.com/paritytech/wasmi/issues/708">#708</a>)</li>
<li><a
href="https://github.com/paritytech/wasmi/commit/eb8d73fd3b2a7f9134bc46d391b6a6963439dbd6"><code>eb8d73f</code></a>
Add <code>extended-const</code> Wasm proposal support (<a
href="https://redirect.github.com/paritytech/wasmi/issues/707">#707</a>)</li>
<li><a
href="https://github.com/paritytech/wasmi/commit/6dbbada8099511e538fb2a26e583012df0c90b5c"><code>6dbbada</code></a>
Add fuel consumption modes (<a
href="https://redirect.github.com/paritytech/wasmi/issues/706">#706</a>)</li>
<li><a
href="https://github.com/paritytech/wasmi/commit/cf7736f57abb7dec469d5485f4a80fcf3aa2a392"><code>cf7736f</code></a>
Normalize fuel costs to roughly 1 fuel per executed instruction (<a
href="https://redirect.github.com/paritytech/wasmi/issues/705">#705</a>)</li>
<li><a
href="https://github.com/paritytech/wasmi/commit/223f815d087fb918493b243182ae24bb960d8336"><code>223f815</code></a>
Update and refactor the <code>wasmi_wasi</code> crate (<a
href="https://redirect.github.com/paritytech/wasmi/issues/700">#700</a>)</li>
<li>See full diff in <a
href="https://github.com/paritytech/wasmi/compare/v0.28.0...v0.29.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>
* Upgraded to newest wasmi
* Refactored benchmarks
* Two new benchmark strategies (`no_metering` and `wasmi_builtin`)
We can now benchmark the execution of modules using our two
instrumentation strategies in addition to no metering (as a baseline)
and wasmi's builtin metering.
We can learn from the following results (ran on my M1) that the builtin
metering decisively outperforms the instrumentation on every single
fixture.
cc @Robbepop
```
coremark/no_metering [15.586 s 15.588 s 15.589 s]
coremark/wasmi_builtin [16.403 s 16.414 s 16.434 s]
coremark/host_function [18.245 s 18.248 s 18.252 s]
coremark/mutable_global [20.476 s 20.486 s 20.505 s]
recursive_ok/no_metering [111.32 µs 111.33 µs 111.34 µs]
recursive_ok/wasmi_builtin [138.64 µs 138.65 µs 138.66 µs]
recursive_ok/host_function [495.55 µs 495.64 µs 495.78 µs]
recursive_ok/mutable_global [514.07 µs 514.09 µs 514.11 µs]
fibonacci_recursive/no_metering [3.9098 µs 3.9102 µs 3.9108 µs]
fibonacci_recursive/wasmi_builtin [4.3242 µs 4.3246 µs 4.3250 µs]
fibonacci_recursive/host_function [12.913 µs 12.914 µs 12.915 µs]
fibonacci_recursive/mutable_global [13.202 µs 13.208 µs 13.212 µs]
factorial_recursive/no_metering [530.72 ns 530.84 ns 530.91 ns]
factorial_recursive/wasmi_builtin [619.17 ns 619.30 ns 619.44 ns]
factorial_recursive/host_function [1.7656 µs 1.7657 µs 1.7659 µs]
factorial_recursive/mutable_global [1.8783 µs 1.8786 µs 1.8788 µs]
count_until/no_metering [1.2422 ms 1.2423 ms 1.2424 ms]
count_until/wasmi_builtin [1.3976 ms 1.3978 ms 1.3981 ms]
count_until/host_function [4.8074 ms 4.8106 ms 4.8125 ms]
count_until/mutable_global [5.9161 ms 5.9169 ms 5.9182 ms]
memory_vec_add/no_metering [4.1630 ms 4.1638 ms 4.1648 ms]
memory_vec_add/wasmi_builtin [4.3913 ms 4.3925 ms 4.3930 ms]
memory_vec_add/host_function [8.2925 ms 8.2949 ms 8.2967 ms]
memory_vec_add/mutable_global [9.1124 ms 9.1152 ms 9.1163 ms]
wasm_kernel::tiny_keccak/no_metering [613.21 µs 613.42 µs 613.58 µs]
wasm_kernel::tiny_keccak/wasmi_builtin [617.04 µs 617.46 µs 617.81 µs]
wasm_kernel::tiny_keccak/host_function [817.24 µs 817.44 µs 817.89 µs]
wasm_kernel::tiny_keccak/mutable_global [873.42 µs 873.90 µs 874.65 µs]
global_bump/no_metering [1.4597 ms 1.4598 ms 1.4600 ms]
global_bump/wasmi_builtin [1.6151 ms 1.6152 ms 1.6153 ms]
global_bump/host_function [5.5393 ms 5.5418 ms 5.5435 ms]
global_bump/mutable_global [6.9446 ms 6.9454 ms 6.9461 ms]
```
Updates the requirements on
[wasmparser](https://github.com/bytecodealliance/wasm-tools) to permit
the latest version.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/bytecodealliance/wasm-tools/commits">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>
* No need to build on nightly: This crate works on stable
* Use larger runners where applicable (linux)
* Only run the tests on macOS and Windows: The rest is OS independent
* fix misprints in doc comments
* added global gas tracker variable and local gas fn
* all exported functions of the module to accept a new param and to set the gas_left global to its value at their very start
* make module support both gas metering methods
* tests fixed for the old metering method
* better naming
* MutableGlobal metering method implemented, tests for the old method pass
* gas_metering::tests updated and pass
* all tests udpdated and pass
* emacs backup files to .gitignore
* docs updated
* clippy fix
* iff = if and only if
* more clippy
* docs misprints fixes
* refactored to have Backend trait and two implementations in separate sub-modules
* docs updated
* fixed old benches (updating them is coming next)
* added bench for an instrumented wasm-coremark
* updated benches: added them for both gas_metering instrumentations
* benches contest first ver
* added debug prints to the bench
* refactored to better fit frontend-backend pattern
* docs update
* updated benches
* design updated on feedback
* re-structured sub-modules
re-structured sub-modules & updated docs
* docs improved
* addressed latest feedback comments
* re-writed the local gas function
* coremark benches show ~20% performance improvement
* fix ci: test + clippy
* save before re-factoring prepare_in_wasm()
* bare_call_16 shows 16% worse perf
* + fibonacci recursive bench
* refactored benchmarks
* + factorial recursive bench
* benches on wasmi fixtures show no perf improvement, coremark runs ~20% faster being instrumented with mutable_global gas metering
* charge gas for local gas func isntructions execution
* replaced benchmark which requires multi_value feature
* save: optimized gas func a bit (benches work, fixture tests fail)
* 1033% overhead on many_blocks.wasm when mut_global gas_metering together with stack_height
* size overhead test for both gas metering methods + stack limiter
* added more benches
* improved print_size_overhead test
* test for comparing size overheads of two gas_metering injectors
* before optimization: benches + size overhead
* optimization try-1: inline part of gas func instructions: +benches +size overheads
* optimization try-2: inline hot path of gas fn: +benches +size overheads
* opt try-3: count for gas fn cost on the caller side: +benches +size overhead
* revert to initial version but with static gas fn cost on the caller side: +benches +sizes
* tests fixed
* use newest wasmi 0.20: +benches +docs updated
* use if-else block instead of Return: +benches
* fix tests
* clippy fix
* addressed review comments
* Update changelog
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
The code assumed that the number of `Local` and number of locals is the
same thing. In reality though it is not. `Local` actually represents a
group of locals with the same type. The group can declare more than one
variable and the number of them is returned by `Local::count`.
In this PR we acknowledge this fact. Along the way we add a checked
arithmetic for locals_count and max_stack_height summation.
Right now if there is a diff between the actual and expected results,
the expected file will be overwritten. This may be annoying. To make it
controlled we introduce BLESS option.
This means that the expected files won't be regenerated unless this
environment variable is set.
Therefore to regenerate the tests use:
BLESS=1 cargo test
Previously, functions that appear in multiple places
(exported, start function, table) would generate a thunk
for each place they appear in. Those additional thunks are
identical and only only one of them would be referenced.
Main offender are tables with redundant entries.
This commit eliminates those duplicate thunks without adding
any additional overhead.
The stack height metering for functions containing
CallIndirect was wrong. The code did not take into
consideration that is pops one value from the stack.
The effect was that the stack height of functions
using this instruction was higher than its real height.
* No need for mem::replace when doing a simple assignment
* Allow specifying the module of the imported 'gas' function
This allows users to place the imported function inside a custom
module instead of the generic 'env' module.
When optimizing the constructor module for a PWasm contract the "deploy" symbol is preserved instead of the "call"
symbol. Before this change `build` would error for PWasm contracts because `pack_instance` would not find the "deploy"
symbol in the optimized contract.
Fixes#128
* refactored out build to lib
* save_raw returns
* fix indentations and other small fixes
* fix build API
* rename Target to SourceTarget
* fix formatting
* make join runtime_type into runtime_type and runtime_version
A Rust library containing a collection of wasm module instrumentations and transformations
mainly useful for wasm based block chains and smart contracts.
Collection of WASM utilities used in Parity and WASM contract devepment
## Provided functionality
## Build tools for cargo
This is a non exhaustive list of provided functionality. Please check out the [documentation](https://docs.rs/wasm-instrument/latest/wasm_instrument/) for details.
Easiest way to use is to install via `cargo install`:
### Gas Metering
```
cargo install pwasm-utils --bin wasm-build
```
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).
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 will optimize WASM symbols tree to leave only those elements that are used by contract `_call` function entry.
This is the kind of indeterminism that can lead to consensus failures when used in a blockchain context.
## Gas counter (wasm-gas)
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.
For development puposes, raw WASM contract can be injected with gas counters (the same way as it done by Parity runtime when running contracts)
Parity WASM runtime provides some library functions that can be commonly found in libc. WASM binary size can be reduced and performance may be improved if these functions are used. This utility scans for invocations of the following functions inside the WASM binary:
-`_malloc`,
-`_free`,
-`_memcpy`,
-`_memset`,
-`_memmove`
And then substitutes them with invocations of the imported ones. Should be run before `wasm-opt` for better results.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.