48 Commits

Author SHA1 Message Date
dependabot[bot] 0b222d76fd Update wasmparser requirement from 0.205 to 0.206 (#103)
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>
2024-04-30 16:29:41 +02:00
dependabot[bot] 2e29897786 Update wasmparser requirement from 0.204 to 0.205 (#101)
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>
2024-04-24 15:34:49 +02:00
dependabot[bot] b974199ad5 Update wasmparser requirement from 0.203 to 0.204 (#98)
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>
2024-04-17 00:49:23 +02:00
dependabot[bot] 5f293e47ff Update wasmparser requirement from 0.200 to 0.203 (#97)
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>
2024-04-16 11:32:01 +02:00
dependabot[bot] 82f3638ba4 Update wasmparser requirement from 0.121 to 0.200 (#90)
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>
2024-02-18 09:30:04 +01:00
dependabot[bot] 74945dc206 Update wasmprinter requirement from 0.2 to 0.200 (#89)
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>
2024-02-18 09:20:40 +01:00
dependabot[bot] 1b7b54ca83 Update wasmparser requirement from 0.119 to 0.121 (#88)
Updates the requirements on
[wasmparser](https://github.com/bytecodealliance/wasm-tools) to permit
the latest version.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/56d0d947f175af01eb91d2ff4b20c43858a2b849"><code>56d0d94</code></a>
Bump crate versions (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1392">#1392</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/04ca1c576ebf1fe424b21f687eed6813c4231974"><code>04ca1c5</code></a>
Enable the component model feature by default (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1391">#1391</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/dcdfb0eea47a8e8d934f45147762b9aa66fbde5d"><code>dcdfb0e</code></a>
Use different limits for items in components (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1390">#1390</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/60ff8695a7b2b097cc18e5a3d1ccf66b0083723d"><code>60ff869</code></a>
<code>wast</code>: Fix pointer provenance bug reported by MIRI (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1386">#1386</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/a6160b38674894612df19be6022af9e4e68a2eda"><code>a6160b3</code></a>
Bump crate versions (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1385">#1385</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/6470aa9df1782b4e7a21e5f065d0b991e0797862"><code>6470aa9</code></a>
<code>wasm-smith</code>: Implement support for generating GC
instructions (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1382">#1382</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/5d42986f3c67816f75700b6df5db7e9c1b3bf2bb"><code>5d42986</code></a>
Break wasm-smith's default dependency on wasmparser (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1384">#1384</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/8b9ba68a18f1bac2f31c4889cc6c462cde3f13a0"><code>8b9ba68</code></a>
add composability for general import (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1380">#1380</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/2210c573bc5508689296e70a2fb9488dc874ad26"><code>2210c57</code></a>
dump: Better printing of rec groups and sub types (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1379">#1379</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/aaf941dbda39029b036f3a9390fe4d3525105774"><code>aaf941d</code></a>
[wast] make constructor of Id public (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1369">#1369</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/bytecodealliance/wasm-tools/compare/wasmparser-0.119.0...wasmparser-0.121.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 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>
2024-01-30 11:35:12 +01:00
dependabot[bot] 39fa497aee Update wasmparser requirement from 0.116 to 0.119 (#85)
Updates the requirements on
[wasmparser](https://github.com/bytecodealliance/wasm-tools) to permit
the latest version.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/0168371fc8c7700c4aebbfabcd9947705eb09eb9"><code>0168371</code></a>
Bump crate versions (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1366">#1366</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/eced912ee8a52b8818924da54a58ea85f0bbdddb"><code>eced912</code></a>
Add migration code for <code>f32</code>/<code>f64</code>. (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1364">#1364</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/7dc8054d2dc5980587676d0c7fc97f117abd184f"><code>7dc8054</code></a>
Update the exception-handling validator implementation (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1333">#1333</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/0616ef196a183cf137ee06b4a5993b7d590088bf"><code>0616ef1</code></a>
Accept <code>f32</code>/<code>f64</code> as aliases for
<code>float32</code>/<code>float64</code>. (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1356">#1356</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/a3f8c60d98dcaab0e08d66ba22cede334fc1ded6"><code>a3f8c60</code></a>
Switch to <code>///</code> for printing documentation comments. (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1357">#1357</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/3c4f2f38211b42b8e5fcf1732c7f5f147e59854d"><code>3c4f2f3</code></a>
wasm-smith: Move Config's Default impl into macro (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1353">#1353</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/4d1f5031027e46b322cc0c9ac8234ad42756c249"><code>4d1f503</code></a>
<code>wasm-smith</code>: Deduplicate and devirtualize configuration (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1351">#1351</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/9de484b8343b2ed1a78a31b5c2597ef4159150bb"><code>9de484b</code></a>
Use <code>bitflags</code> for symbol flags (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1350">#1350</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/928a946cab2cfc17f16d7f075e395a68456b24e3"><code>928a946</code></a>
Add parsing for <code>linking</code> custom section (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1348">#1348</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/810a98c7a5c462a5ae97366ffcf979883a9cc16c"><code>810a98c</code></a>
<code>wasmparser</code>: Get more GC spec tests passing (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1346">#1346</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/bytecodealliance/wasm-tools/compare/wasmparser-0.116.0...wasmparser-0.119.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 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>
2024-01-10 11:11:16 +00:00
dependabot[bot] 0c739d92c4 Update wasmparser requirement from 0.111 to 0.116 (#77)
Updates the requirements on
[wasmparser](https://github.com/bytecodealliance/wasm-tools) to permit
the latest version.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/22402e3a057422ced35acd629cd3324bf4d983a3"><code>22402e3</code></a>
Bump crate versions (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1266">#1266</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/34efe2b9b92e34f91c1415981e8cd81a6c08f703"><code>34efe2b</code></a>
Fix trivial typo in define_types.rs (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1265">#1265</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/112285c9a05c152dd2e007cd85c16784f52bc18a"><code>112285c</code></a>
Remove &quot;interface imports&quot; from binary syntax, expand accepted
strings (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1262">#1262</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/8f71316e421cabb5360d0320f7ca9ee20d692842"><code>8f71316</code></a>
<code>wasmparser</code>: Define core Wasm types in a macro (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1264">#1264</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/e18b17f30166135d211a9645619d68370c90e693"><code>e18b17f</code></a>
wit-component: minor code simplification in linking.rs (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1259">#1259</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/dc5c0c5c820d31d44c48bb6c5b707a9d3de2a242"><code>dc5c0c5</code></a>
wit-component: use library order to determine duplicate symbol priority
(<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1258">#1258</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/537111b9a705168e3705177a82813f1d49c6a7c9"><code>537111b</code></a>
wasmparser: Use type-specific identifiers pervasively (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1257">#1257</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/cc6a4bee4e3b04151046dbb7ddc635b422541a04"><code>cc6a4be</code></a>
Bump crate versions (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1256">#1256</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/4468adce8bfcca628718f2789633882f398db25f"><code>4468adc</code></a>
Enable omitting versions in world selection (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1255">#1255</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/b57d64c9d5ceaa15d8036b29011093090de75529"><code>b57d64c</code></a>
Change the encoding of wit definitions (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1252">#1252</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/bytecodealliance/wasm-tools/compare/wasmparser-0.111.0...wasmparser-0.116.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 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>
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
2023-11-07 10:13:57 +01:00
dependabot[bot] 060317f70d Update criterion requirement from 0.4 to 0.5 (#63)
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>
2023-11-07 10:13:41 +01:00
dependabot[bot] 998bbb8bd5 Bump actions/checkout from 3 to 4 (#73)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to
4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/checkout/releases">actions/checkout's
releases</a>.</em></p>
<blockquote>
<h2>v4.0.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Update default runtime to node20 by <a
href="https://github.com/takost"><code>@​takost</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1436">actions/checkout#1436</a></li>
<li>Support fetching without the --progress option by <a
href="https://github.com/simonbaird"><code>@​simonbaird</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1067">actions/checkout#1067</a></li>
<li>Release 4.0.0 by <a
href="https://github.com/takost"><code>@​takost</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1447">actions/checkout#1447</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/takost"><code>@​takost</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1436">actions/checkout#1436</a></li>
<li><a
href="https://github.com/simonbaird"><code>@​simonbaird</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1067">actions/checkout#1067</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v3...v4.0.0">https://github.com/actions/checkout/compare/v3...v4.0.0</a></p>
<h2>v3.6.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Mark test scripts with Bash'isms to be run via Bash by <a
href="https://github.com/dscho"><code>@​dscho</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1377">actions/checkout#1377</a></li>
<li>Add option to fetch tags even if fetch-depth &gt; 0 by <a
href="https://github.com/RobertWieczoreck"><code>@​RobertWieczoreck</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/579">actions/checkout#579</a></li>
<li>Release 3.6.0 by <a
href="https://github.com/luketomlinson"><code>@​luketomlinson</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/1437">actions/checkout#1437</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/RobertWieczoreck"><code>@​RobertWieczoreck</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/579">actions/checkout#579</a></li>
<li><a
href="https://github.com/luketomlinson"><code>@​luketomlinson</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1437">actions/checkout#1437</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v3.5.3...v3.6.0">https://github.com/actions/checkout/compare/v3.5.3...v3.6.0</a></p>
<h2>v3.5.3</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix: Checkout Issue in self hosted runner due to faulty submodule
check-ins by <a
href="https://github.com/megamanics"><code>@​megamanics</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1196">actions/checkout#1196</a></li>
<li>Fix typos found by codespell by <a
href="https://github.com/DimitriPapadopoulos"><code>@​DimitriPapadopoulos</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/1287">actions/checkout#1287</a></li>
<li>Add support for sparse checkouts by <a
href="https://github.com/dscho"><code>@​dscho</code></a> and <a
href="https://github.com/dfdez"><code>@​dfdez</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1369">actions/checkout#1369</a></li>
<li>Release v3.5.3 by <a
href="https://github.com/TingluoHuang"><code>@​TingluoHuang</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/1376">actions/checkout#1376</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/megamanics"><code>@​megamanics</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1196">actions/checkout#1196</a></li>
<li><a
href="https://github.com/DimitriPapadopoulos"><code>@​DimitriPapadopoulos</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1287">actions/checkout#1287</a></li>
<li><a href="https://github.com/dfdez"><code>@​dfdez</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1369">actions/checkout#1369</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v3...v3.5.3">https://github.com/actions/checkout/compare/v3...v3.5.3</a></p>
<h2>v3.5.2</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix: Use correct API url / endpoint in GHES by <a
href="https://github.com/fhammerl"><code>@​fhammerl</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1289">actions/checkout#1289</a>
based on <a
href="https://redirect.github.com/actions/checkout/issues/1286">#1286</a>
by <a href="https://github.com/1newsr"><code>@​1newsr</code></a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v3.5.1...v3.5.2">https://github.com/actions/checkout/compare/v3.5.1...v3.5.2</a></p>
<h2>v3.5.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Improve checkout performance on Windows runners by upgrading
<code>@​actions/github</code> dependency by <a
href="https://github.com/BrettDong"><code>@​BrettDong</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1246">actions/checkout#1246</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/BrettDong"><code>@​BrettDong</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/checkout/pull/1246">actions/checkout#1246</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/actions/checkout/blob/main/CHANGELOG.md">actions/checkout's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<h2>v4.0.0</h2>
<ul>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1067">Support
fetching without the --progress option</a></li>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1436">Update to
node20</a></li>
</ul>
<h2>v3.6.0</h2>
<ul>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1377">Fix: Mark
test scripts with Bash'isms to be run via Bash</a></li>
<li><a href="https://redirect.github.com/actions/checkout/pull/579">Add
option to fetch tags even if fetch-depth &gt; 0</a></li>
</ul>
<h2>v3.5.3</h2>
<ul>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1196">Fix:
Checkout fail in self-hosted runners when faulty submodule are
checked-in</a></li>
<li><a href="https://redirect.github.com/actions/checkout/pull/1287">Fix
typos found by codespell</a></li>
<li><a href="https://redirect.github.com/actions/checkout/pull/1369">Add
support for sparse checkouts</a></li>
</ul>
<h2>v3.5.2</h2>
<ul>
<li><a href="https://redirect.github.com/actions/checkout/pull/1289">Fix
api endpoint for GHES</a></li>
</ul>
<h2>v3.5.1</h2>
<ul>
<li><a href="https://redirect.github.com/actions/checkout/pull/1246">Fix
slow checkout on Windows</a></li>
</ul>
<h2>v3.5.0</h2>
<ul>
<li><a href="https://redirect.github.com/actions/checkout/pull/1237">Add
new public key for known_hosts</a></li>
</ul>
<h2>v3.4.0</h2>
<ul>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1209">Upgrade
codeql actions to v2</a></li>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1210">Upgrade
dependencies</a></li>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1225">Upgrade
<code>@​actions/io</code></a></li>
</ul>
<h2>v3.3.0</h2>
<ul>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1045">Implement
branch list using callbacks from exec function</a></li>
<li><a href="https://redirect.github.com/actions/checkout/pull/1050">Add
in explicit reference to private checkout options</a></li>
<li>[Fix comment typos (that got added in <a
href="https://redirect.github.com/actions/checkout/issues/770">#770</a>)](<a
href="https://redirect.github.com/actions/checkout/pull/1057">actions/checkout#1057</a>)</li>
</ul>
<h2>v3.2.0</h2>
<ul>
<li><a href="https://redirect.github.com/actions/checkout/pull/942">Add
GitHub Action to perform release</a></li>
<li><a href="https://redirect.github.com/actions/checkout/pull/967">Fix
status badge</a></li>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1002">Replace
datadog/squid with ubuntu/squid Docker image</a></li>
<li><a href="https://redirect.github.com/actions/checkout/pull/964">Wrap
pipeline commands for submoduleForeach in quotes</a></li>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1029">Update
<code>@​actions/io</code> to 1.1.2</a></li>
<li><a
href="https://redirect.github.com/actions/checkout/pull/1039">Upgrading
version to 3.2.0</a></li>
</ul>
<h2>v3.1.0</h2>
<ul>
<li><a href="https://redirect.github.com/actions/checkout/pull/939">Use
<code>@​actions/core</code> <code>saveState</code> and
<code>getState</code></a></li>
<li><a href="https://redirect.github.com/actions/checkout/pull/922">Add
<code>github-server-url</code> input</a></li>
</ul>
<h2>v3.0.2</h2>
<ul>
<li><a href="https://redirect.github.com/actions/checkout/pull/770">Add
input <code>set-safe-directory</code></a></li>
</ul>
<h2>v3.0.1</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/actions/checkout/commit/3df4ab11eba7bda6032a0b82a6bb43b11571feac"><code>3df4ab1</code></a>
Release 4.0.0 (<a
href="https://redirect.github.com/actions/checkout/issues/1447">#1447</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/8b5e8b768746b50394015010d25e690bfab9dfbc"><code>8b5e8b7</code></a>
Support fetching without the --progress option (<a
href="https://redirect.github.com/actions/checkout/issues/1067">#1067</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/97a652b80035363df47baee5031ec8670b8878ac"><code>97a652b</code></a>
Update default runtime to node20 (<a
href="https://redirect.github.com/actions/checkout/issues/1436">#1436</a>)</li>
<li>See full diff in <a
href="https://github.com/actions/checkout/compare/v3...v4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=3&new-version=4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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>
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
2023-11-07 10:13:22 +01:00
StackOverflowExcept1on fd3b1f856b chore: fix clippy warnings on latest nightly rust (#78)
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`
2023-11-07 10:03:36 +01:00
StackOverflowExcept1on fdce5c64f1 chore: modernize WASM tests (#79)
I tried locally merge `fix-tests` and `fix-clippy` branches and CI
should work after my PRs
2023-11-07 09:14:09 +01:00
dependabot[bot] 6307588b3d Update wasmparser requirement from 0.110 to 0.111 (#71)
Updates the requirements on
[wasmparser](https://github.com/bytecodealliance/wasm-tools) to permit
the latest version.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/2e63788ad535724e49a0da036281d9663b6d5294"><code>2e63788</code></a>
Bump crate versions (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1173">#1173</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/c17cf172b319a0f07f797a224a4152fa42ff581d"><code>c17cf17</code></a>
Disallow <code>(borrow $t)</code> in function result types (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1162">#1162</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/9fb2019dca043434837c996ec5105de350bccaea"><code>9fb2019</code></a>
wit-component: Add doc comment printing to WitPrinter (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1167">#1167</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/a0c46a7a16fef5cc9143ad30c77f19303c27d907"><code>a0c46a7</code></a>
Probe for post-return instead of asserting existence (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1159">#1159</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/4678a61ae428da21299aeae016bd56d5e248248f"><code>4678a61</code></a>
[wit-component] add shared-everything linking support (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1133">#1133</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/06aa46eda73d02b38c924c01806aac7eece5d58b"><code>06aa46e</code></a>
Extract <code>LocalParser</code> for parsing <code>local</code>. (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1156">#1156</a>)
(<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1161">#1161</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/3e1fb68b217b210c816a504fa7abe0907c9c9039"><code>3e1fb68</code></a>
Add text format and printing support for <code>dylink.0</code> (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1135">#1135</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/9ed609db08183dc2b2fe239af5204bb9d6456a8a"><code>9ed609d</code></a>
Fix a panic decoding WIT from a component (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1157">#1157</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/2b4ade8c808f5c26a701d1c7a883ea1893d2553f"><code>2b4ade8</code></a>
Rename <code>Resolve::push_wasm</code> to <code>push_flat</code> (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1158">#1158</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/559ede0a436240cb7dfe162c568f398655e9b18c"><code>559ede0</code></a>
Update wasm-compose example based on latest changes. (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1154">#1154</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/bytecodealliance/wasm-tools/compare/wasmparser-0.110.0...wasmparser-0.111.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 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>
2023-08-20 11:45:30 +02:00
dependabot[bot] ca0a83ff91 Update wasmparser requirement from 0.109 to 0.110 (#69)
Updates the requirements on
[wasmparser](https://github.com/bytecodealliance/wasm-tools) to permit
the latest version.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/94ad03bdb292549d6d699518343bad5639c05e8d"><code>94ad03b</code></a>
Bump crate versions (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1145">#1145</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/dd6ddb31e9ffdc7cc04284a544a2738dc28e88c7"><code>dd6ddb3</code></a>
Fix encoding of type information in wasm-compose (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1141">#1141</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/6f4508ab3b96515b44d842c6cac5879358e76fe4"><code>6f4508a</code></a>
Move the wasm-tools CLI to the <code>src/bin</code> directory (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1144">#1144</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/c18d59fdfc906c0f9aae2f05318b6b890fc8d429"><code>c18d59f</code></a>
Fix wit-component not removing dead type imports (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1143">#1143</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/69b5213dda658510f8c14c484520bd3a2619a8a9"><code>69b5213</code></a>
Disallow empty types in the component model (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1142">#1142</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/23a2d6c56ec3698e809c7aad1806c5cd188dc658"><code>23a2d6c</code></a>
Convert more things to links in the rustdoc documentation. (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1137">#1137</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/ac8d61669ee1188b4bbd09168fcb62944bcc55d1"><code>ac8d616</code></a>
Fix the <code>Parser::parse</code> example to work with nested
components (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1136">#1136</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/188de0fd412dd01dd41bf91c897935934282c13d"><code>188de0f</code></a>
Fix a few typos in resolver (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1132">#1132</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/cea2220ebb4e45041ef8c3ab13c0a87add632714"><code>cea2220</code></a>
Move component <code>value</code> support behind a feature flag (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1131">#1131</a>)</li>
<li>See full diff in <a
href="https://github.com/bytecodealliance/wasm-tools/compare/wasmparser-0.109.0...wasmparser-0.110.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-08-01 13:09:32 +02:00
dependabot[bot] 16469520a4 Update wasmi requirement from 0.29 to 0.31 (#70)
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> -&gt; <code>0.5.0</code></li>
<li><code>wast 0.52.0</code> -&gt; <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> -&gt; <code>0.5.0</code></li>
<li><code>wast 0.52.0</code> -&gt; <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>
2023-08-01 09:44:27 +02:00
dependabot[bot] 1d83a81c05 Update wasmparser requirement from 0.108 to 0.109 (#68)
Updates the requirements on
[wasmparser](https://github.com/bytecodealliance/wasm-tools) to permit
the latest version.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/b19ce5165cf2b0c20e01e0dc238712c4d44b42be"><code>b19ce51</code></a>
Bump versions (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1128">#1128</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/7cec276e1a3e600bd8036f672c9483d875f164e8"><code>7cec276</code></a>
Remove public deps from <code>wasm-metadata</code>'s API (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1130">#1130</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/c91f611be4b8c4ea5d9d936594f68c0104dd80dd"><code>c91f611</code></a>
Update handling and parsing of element segments (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1126">#1126</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/07229fec475d38a56949a1ddab354e5813cc7ca7"><code>07229fe</code></a>
Update to new GC cast instruction encoding (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1127">#1127</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/3948ae92972785b252f3c76af601ac83ee3ac3da"><code>3948ae9</code></a>
Update wit-component's <code>bitflags</code> dependency (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1123">#1123</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/8c7e3c5df72d075b66dd5d18ac4bee10041b1353"><code>8c7e3c5</code></a>
Update serde_yaml used by <code>wasm-compose</code> (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1124">#1124</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/6f59f98f7c4f94632df7c88627bbdc46db81ab02"><code>6f59f98</code></a>
Implement returning option/result of a handle in code generation (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1121">#1121</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/42f4bbf5e4218a83cca93b900ecd681b92a89b1a"><code>42f4bbf</code></a>
Fix parsing out-of-bounds <code>nan</code> constants (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1111">#1111</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/aa161581efeafe5e2be665925b365394b09473c9"><code>aa16158</code></a>
Fix &quot;duplicate identifier for field&quot; for subtype fields (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1117">#1117</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/3186350fca1a749f933334270bd46582e2130ccb"><code>3186350</code></a>
Don't lex the entire input immediately (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1110">#1110</a>)</li>
<li>See full diff in <a
href="https://github.com/bytecodealliance/wasm-tools/compare/wasmparser-0.108.0...wasmparser-0.109.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-07-21 17:11:34 +02:00
dependabot[bot] 7fa2cd3cd2 Update wasmparser requirement from 0.104 to 0.108 (#67)
Updates the requirements on
[wasmparser](https://github.com/bytecodealliance/wasm-tools) to permit
the latest version.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/620b4ab26820b67f93e70022e6cf656c5d7fb108"><code>620b4ab</code></a>
Bump crate versions (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1118">#1118</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/46f9053e4100f6341ae704c0ee468b18a00ba1e3"><code>46f9053</code></a>
Update binary format for <code>resource.drop</code> (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1116">#1116</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/b3990e8b59e46b7acc76c8d7b2cf4470f08e2cd6"><code>b3990e8</code></a>
Reduce verbosity in wasmparser <code>Types</code> API (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1106">#1106</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/27f511cc60f7a83ae5149cc36105aa6233f13a9b"><code>27f511c</code></a>
Fix wit-smith syntax for static functions (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1113">#1113</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/2413c71e542a371044c073006b3f83158344f327"><code>2413c71</code></a>
Test a wasm target in CI (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1112">#1112</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/4a568a3eb3d82ac3fa92bd8f64ff69116fca307a"><code>4a568a3</code></a>
Don't panic in wasmprinter with non-function types (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1114">#1114</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/6dae59e0b80c17ef7cee0ce67c886ad92a184049"><code>6dae59e</code></a>
fix: assertions for wasm target (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1109">#1109</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/3379199d0d58da323740f7fdaa4618b459851b5d"><code>3379199</code></a>
feat(wasm-compose): --definitions configuration for components with
exports d...</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/195cc43bcf3b76f4cf19310dbcbd7825689f3b6a"><code>195cc43</code></a>
Fix exponential behavior elaborating WIT world exports (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1107">#1107</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/14b48186365c1340861f0c14485d6a0f4429de9e"><code>14b4818</code></a>
Shrink the size of wast text tokens (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1103">#1103</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/bytecodealliance/wasm-tools/compare/wasmparser-0.104.0...wasmparser-0.108.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-07-14 15:03:30 +09:00
dependabot[bot] 28e964d9d1 Update wasmparser requirement from 0.103 to 0.104 (#60)
Updates the requirements on
[wasmparser](https://github.com/bytecodealliance/wasm-tools) to permit
the latest version.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/1e573fb1ae0ca457be1d06aa55a2fab06fa13b44"><code>1e573fb</code></a>
Bump crate versions (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/1002">#1002</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/11cf92cf663cda0d68b5823e7d868d0ba7acdc84"><code>11cf92c</code></a>
Initial implementation of resource types (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/966">#966</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/207472c004b0e69a721529b08e4cd3ec24394b26"><code>207472c</code></a>
[wasm-encoder] Add encoding for coredumps (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/998">#998</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/016838279808be4d257f1b58b9942420f0a09855"><code>0168382</code></a>
Fix wasm-encoder's encoding of element segments (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/995">#995</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/6e660de665ccb68a10b49d8fb726579d1874fd6f"><code>6e660de</code></a>
Support core wasm inputs to <code>wasm-tools component wit</code> (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/994">#994</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/734accf3197ef82782e6f81ab8e53311df0a64bb"><code>734accf</code></a>
Require 'alias core export' when aliasing core item (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/997">#997</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/95c6bf7de19c26db41f5e40b9a3af61eecc7de57"><code>95c6bf7</code></a>
Add a new <code>wit-smith</code> subcommand (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/992">#992</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/f69b0860ba8afec33b38992c04e1c994b6bcfd76"><code>f69b086</code></a>
Fix some fuzz-discovered issues in WIT parsing and encoding (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/991">#991</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/b00cc2c965de53a09fe67d3839083c1e32ada460"><code>b00cc2c</code></a>
Add a <code>--skeleton</code> option to <code>wasm-tools print</code>
(<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/990">#990</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/d1f35fcd1ad64c9baceae81b1b5cb98e25c7b7de"><code>d1f35fc</code></a>
wasm-mutate: Fix removing table 0 when an element references it (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/984">#984</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/bytecodealliance/wasm-tools/compare/wasmparser-0.103.0...wasmparser-0.104.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-04-28 12:11:43 +02:00
dependabot[bot] c07099b8d5 Update wasmparser requirement from 0.102 to 0.103 (#59)
Updates the requirements on
[wasmparser](https://github.com/bytecodealliance/wasm-tools) to permit
the latest version.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/d808ad752f4e1e5e7aaecc226813162e2b0d0655"><code>d808ad7</code></a>
Bump crate verisons (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/982">#982</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/b17fc48a23152735bafd8f7ee95e3b55683d9511"><code>b17fc48</code></a>
Optimize types in wasmparser slightly (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/979">#979</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/874e2fa79ff0c01b1594aed13f5e78b6f1e84416"><code>874e2fa</code></a>
Improve wit component errors when failing to decode function (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/978">#978</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/027507a75a705774c08b8b646ae9b9d70c3f702c"><code>027507a</code></a>
wit-component: Implement merging <code>Resolve</code>s together (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/974">#974</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/a791205f4e0586bc3565460effbc22e01192b155"><code>a791205</code></a>
Update wasm-tools compose example with latest cargo component (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/976">#976</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/faf3c51fefa93c56215a3838a0f2ebd9932c93d8"><code>faf3c51</code></a>
wast: Update GC proposal instructions (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/972">#972</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/9c94ab1af1443f79b27b30218e29f1f0fc0260c0"><code>9c94ab1</code></a>
wasmparser: Pack <code>RefType</code> into a <code>[u8; 3]</code> (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/971">#971</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/d550bd5491f9433bc42601f03a632ade53805b62"><code>d550bd5</code></a>
<code>wasmparser</code>: turn table index in the elements section into
an <code>Option</code> (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/957">#957</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/3af2562b91fbe5ea225f193b3dc2747142dce18e"><code>3af2562</code></a>
tests(wit-component): update <code>wasi-http</code> interface (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/969">#969</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/1e0052974277b3cce6c3703386e4e90291da2b24"><code>1e00529</code></a>
preserve <code>cabi_post_</code> exports when appropriate (<a
href="https://redirect.github.com/bytecodealliance/wasm-tools/issues/965">#965</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/bytecodealliance/wasm-tools/compare/wasmparser-0.102.0...wasmparser-0.103.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-04-14 10:39:34 +02:00
dependabot[bot] 6039337457 Update wasmi requirement from 0.28 to 0.29 (#58)
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>
2023-03-21 00:11:34 +01:00
dependabot[bot] 51daef9eba Update wasmparser requirement from 0.101 to 0.102 (#57)
Updates the requirements on
[wasmparser](https://github.com/bytecodealliance/wasm-tools) to permit
the latest version.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/1d75a98fe32f9f4ea8cca2e51377116201e60e81"><code>1d75a98</code></a>
Bump crate versions (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/950">#950</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/cfc1d6052e4596ba6c577b1bb192fc6423b46154"><code>cfc1d60</code></a>
Fix size/align calculations for WIT variants (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/948">#948</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/ae010afe5a252b645fcfebf0b32d7a42384c57b8"><code>ae010af</code></a>
Increase limits on component/module/instance types (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/947">#947</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/6da2f7490d12c36cc3652bb2c150b13262892af2"><code>6da2f74</code></a>
Restrict component import/export overlap (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/946">#946</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/efb9316b2fd462150c259a11a984a59d3e0cbfd8"><code>efb9316</code></a>
Update support for the relaxed-simd proposal (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/944">#944</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/56cdbdd3fc6b1aca1afb13268bc5f3494e9c5b6c"><code>56cdbdd</code></a>
Increase the maximum type size to 1M (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/945">#945</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/c892013426b5143b3e6108d2fc42ef825e63fe88"><code>c892013</code></a>
Improve validation error when component model feature not enabled (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/939">#939</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/cdbaae2272b12bc70ceb76587f0f9c8968b7ffe1"><code>cdbaae2</code></a>
bump versions (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/942">#942</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/07a55c628d20a9f5cb21c684da430d9453c3f6a5"><code>07a55c6</code></a>
wasm-compose: update the example for latest tooling. (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/941">#941</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/4ee705fbb5600ae51ec3192b5a1cbf8f67bfda95"><code>4ee705f</code></a>
Remove outdated <code>is_char</code> check in ABI lowering (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/938">#938</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/bytecodealliance/wasm-tools/compare/wasmparser-0.101.0...wasmparser-0.102.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-03-07 03:19:53 +01:00
Alexander Theißen 3ba9c2cfa1 Add benchmarks for wasmi builtin metering (#56)
* 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]
```
2023-03-06 22:06:45 +01:00
dependabot[bot] 16297ab942 Update wasmparser requirement from 0.100 to 0.101 (#53)
Updates the requirements on
[wasmparser](https://github.com/bytecodealliance/wasm-tools) to permit
the latest version.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/ca2e77094dc1896d6d8c85d638981c6bfb4f9ae6"><code>ca2e770</code></a>
Bump crate versions (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/931">#931</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/de36f6c60166bcbc7681f6b97dd5990441cb43a6"><code>de36f6c</code></a>
Support wit bindgens adding producer information via component-type
metadata ...</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/902e2898c8965c1b75051bb64ef6d774f46447d2"><code>902e289</code></a>
Add a function to extract a world from a document (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/928">#928</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/c242e9a7e79d989792d1824915ac192a2afb57d9"><code>c242e9a</code></a>
Fix validation of <code>ref.func</code> without function-references (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/925">#925</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/e713d1e8e71b170c880c2ddad8bfb9f992c57b47"><code>e713d1e</code></a>
Fix validation panic with unreachable code (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/926">#926</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/cda63d228ab58ebaccff1d5f544ae3c65a8d506a"><code>cda63d2</code></a>
Run more function-references tests (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/922">#922</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/dd5ad96a52b5095fc4dcb9b305ebe8c8b5041a98"><code>dd5ad96</code></a>
Fix a copy/paste mistake in add-function mutator (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/927">#927</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/e5293d587f463e67d42ca26b151cd7afdc0a5e17"><code>e5293d5</code></a>
Function references (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/701">#701</a>)</li>
<li>See full diff in <a
href="https://github.com/bytecodealliance/wasm-tools/compare/wasmparser-0.100.0...wasmparser-0.101.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-03-04 22:25:57 +01:00
dependabot[bot] 325cdb8969 Update wasmparser requirement from 0.99 to 0.100 (#51)
Updates the requirements on
[wasmparser](https://github.com/bytecodealliance/wasm-tools) to permit
the latest version.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/0932bc10082c6457a33164beb1b07d64cbdc093e"><code>0932bc1</code></a>
Bump crate versions (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/921">#921</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/c7e5beb2849d8fef26988758de171ac860fe5848"><code>c7e5beb</code></a>
Encode exported instances with nested components (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/918">#918</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/37f63ebefb90b41c1c5757098fe93b192ec04139"><code>37f63eb</code></a>
wit-component: lazily allocate adapter stack when appropriate (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/919">#919</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/fc5ab6cd9165c50afdbb58bb1a65c0bc2cc3fd8c"><code>fc5ab6c</code></a>
Reduce the code size of some wasm-mutate functions (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/917">#917</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/49d3adc05022aee0faa77eeca3bc3872c29fa7fd"><code>49d3adc</code></a>
Implement export type ascription (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/913">#913</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/02291c7a4ba43d3371072fb39908f1cca88e99a3"><code>02291c7</code></a>
Model types-in-worlds as imports (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/916">#916</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/e34c72f8d95220ec1f4a8e189e3af615e9baccb7"><code>e34c72f</code></a>
Add a test suite for the <code>wasm-tools</code> CLI (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/915">#915</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/22c9e0f26240344aadcab7dcb5093f8f7d73780d"><code>22c9e0f</code></a>
Remove function-based subtyping (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/914">#914</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/098ad8230d10bb5e131b9c01a1883045ccbd083d"><code>098ad82</code></a>
Disable float types with <code>floats = false</code> (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/912">#912</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/90e4d87beded25f7285aa9ec06e9d594e071d048"><code>90e4d87</code></a>
Bump crate versions (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/907">#907</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/bytecodealliance/wasm-tools/compare/wasmparser-0.99.0...wasmparser-0.100.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-02-12 21:38:31 +01:00
dependabot[bot] 53f640af63 Update wasmparser requirement from 0.98 to 0.99 (#48)
Updates the requirements on
[wasmparser](https://github.com/bytecodealliance/wasm-tools) to permit
the latest version.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/278c3ee93f0ebbcb7221b1410a402b62ae56c4ae"><code>278c3ee</code></a>
Bump versions of crates (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/891">#891</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/a7c8b09391b70235bb539ec750aa90798ac1e1ec"><code>a7c8b09</code></a>
Fix a slew of fuzz bugs in wit-{parser,component} (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/886">#886</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/b7eb6aae41dfd7c76dec6f53923b8de4785f1af5"><code>b7eb6aa</code></a>
wasm-mutate: Add an &quot;AddCustomSection&quot; mutator (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/890">#890</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/cacda73ccb6f9f8cc42e8391c77480187c99b48d"><code>cacda73</code></a>
Fix resolving memory names of <code>memory.discard</code> in text format
(<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/888">#888</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/8173865e15f7b259b92093cb283a40655565bbd4"><code>8173865</code></a>
<code>wasm-smith</code>: Add support for the Wasm tail calls proposal
(<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/887">#887</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/507c0541586ca4e4c88cf43c66210140e018b435"><code>507c054</code></a>
Fix references to imported types in the text format (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/885">#885</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/e60c726ee5fafe0a62e18aa4f0924d1298140524"><code>e60c726</code></a>
Manually bump patch versions to move over yanks</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/ed2558cd7764061af02925f111fe762580cc9920"><code>ed2558c</code></a>
Bump versions for real</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/7d5843d19067625c79e8af6561dfe4609b0c6ac8"><code>7d5843d</code></a>
Revert &quot;Bump crate versions (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/884">#884</a>)&quot;</li>
<li>See full diff in <a
href="https://github.com/bytecodealliance/wasm-tools/compare/wasmparser-0.98.0...wasmparser-0.99.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-25 19:00:34 -03:00
dependabot[bot] a667e38b5a Update wasmparser requirement from 0.97 to 0.98 (#47)
Updates the requirements on
[wasmparser](https://github.com/bytecodealliance/wasm-tools) to permit
the latest version.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/e60c726ee5fafe0a62e18aa4f0924d1298140524"><code>e60c726</code></a>
Manually bump patch versions to move over yanks</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/ed2558cd7764061af02925f111fe762580cc9920"><code>ed2558c</code></a>
Bump versions for real</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/7d5843d19067625c79e8af6561dfe4609b0c6ac8"><code>7d5843d</code></a>
Revert &quot;Bump crate versions (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/884">#884</a>)&quot;</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/d23f487448e1f2f3545a36328d70021693d4400c"><code>d23f487</code></a>
Bump crate versions (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/884">#884</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/398b367f79a086a0b2f8fa0f71657d523c29d079"><code>398b367</code></a>
Add experimental memory.discard instruction (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/882">#882</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/9a51f6de46d29cbafd8cc3b3e50bd2447f7e7fb3"><code>9a51f6d</code></a>
VisitOperator: implement delegates for Box&lt;VisitOperator&gt; (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/883">#883</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/208b2e79fbc0ba0c9e63a9ea15e60fcec437b383"><code>208b2e7</code></a>
Fix some minor issues in <code>wit-component</code> (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/881">#881</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/a1fdde03f81aa14709d73fb6ddde21b55d22177c"><code>a1fdde0</code></a>
VisitOperator: implement delegate from &amp;mut VisitOperator (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/880">#880</a>)</li>
<li>See full diff in <a
href="https://github.com/bytecodealliance/wasm-tools/compare/wasmparser-0.97.0...wasmparser-0.98.1">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-20 21:54:51 -03:00
dependabot[bot] b67ac31310 Update wasmparser requirement from 0.96 to 0.97 (#45)
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>
2023-01-17 23:34:52 -03:00
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
Alexander Theißen 74716698f5 Speedup CI (#43)
* 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
2023-01-10 16:01:52 -03:00
dependabot[bot] 54213f77f6 Update wasmi requirement from 0.20 to 0.21 (#42)
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.21.0 - 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>
<li>Improve feedback when running a Wasm module without exported
function using <code>wasmi</code> CLI. (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/584">paritytech/wasmi#584</a>)</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>[0.21.0] - 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>
<li>Improve feedback when running a Wasm module without exported
function using <code>wasmi</code> CLI. (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/584">paritytech/wasmi#584</a>)</li>
</ul>
<h2>[0.20.0] - 2022-11-04</h2>
<h3>Added</h3>
<ul>
<li>Contribution documentation about fuzz testing. (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/529">paritytech/wasmi#529</a>)</li>
</ul>
<h3>Removed</h3>
<ul>
<li>Removed some deprecated functions in the <code>wasmi_core</code>
crate. (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/545">paritytech/wasmi#545</a>)</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>Fixed a critical performance regression introduced in Rust 1.65. (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/518">paritytech/wasmi#518</a>)
<ul>
<li>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.</li>
<li>You can read more about this performance regression <a
href="https://github-redirect.dependabot.com/rust-lang/rust/issues/102952">in
this thread</a>.</li>
</ul>
</li>
</ul>
<h3>Changed</h3>
<ul>
<li>Fixed handling of edge cases with respect to Wasm linear memory. (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/449">paritytech/wasmi#449</a>)
<ul>
<li>This allows for <code>wasmi</code> to properly setup and use linear
memory instances of up to 4GB.</li>
</ul>
</li>
<li>Optimize and improve Wasm instantiation. (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/531">paritytech/wasmi#531</a>)</li>
<li>Optimize <code>global.get</code> of immutable non-imported globals.
(<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/pull/533">paritytech/wasmi#533</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/9e228e8a253074bf25cfcfeff11b07ff2033170e"><code>9e228e8</code></a>
Bump <code>wasmi</code> version to <code>0.21.0</code> (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/issues/604">#604</a>)</li>
<li><a
href="https://github.com/paritytech/wasmi/commit/8fb3a58de76a10b0072d0c71fd1677a96f33009f"><code>8fb3a58</code></a>
Prepare for <code>wasmi</code> version <code>0.21.0</code> release (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/issues/603">#603</a>)</li>
<li><a
href="https://github.com/paritytech/wasmi/commit/829ae5b115e8d8f484c93798309ac9e1eb7351eb"><code>829ae5b</code></a>
Resumable Function Calls (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/issues/598">#598</a>)</li>
<li><a
href="https://github.com/paritytech/wasmi/commit/3c62031d096a73c59edb05ea5cc508e5bc65b0f6"><code>3c62031</code></a>
Add <code>res: EngineResources</code> field to
<code>EngineExecutor</code> (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/issues/602">#602</a>)</li>
<li><a
href="https://github.com/paritytech/wasmi/commit/bbcfc21deea430f82aac6c268ffea61587173060"><code>bbcfc21</code></a>
Refactor <code>Engine</code> internals (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/issues/601">#601</a>)</li>
<li><a
href="https://github.com/paritytech/wasmi/commit/3186c023210a537d0fd70517942a1ebd0c5ad3f7"><code>3186c02</code></a>
Return <code>()</code> from <code>CallResults</code> for slices (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/issues/600">#600</a>)</li>
<li><a
href="https://github.com/paritytech/wasmi/commit/8965c9af96beb189919c0a2aa306a8ae111141ad"><code>8965c9a</code></a>
Refactor FuncType verification (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/issues/599">#599</a>)</li>
<li><a
href="https://github.com/paritytech/wasmi/commit/2b5a48618fa9acb1d36e91ba9325623d6858e0e6"><code>2b5a486</code></a>
CLI: Improve CLI parsing (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/issues/596">#596</a>)</li>
<li><a
href="https://github.com/paritytech/wasmi/commit/da8e4a694054ea218b316c31f28aae5494a42119"><code>da8e4a6</code></a>
Allow host functions to call Wasm functions (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/issues/590">#590</a>)</li>
<li><a
href="https://github.com/paritytech/wasmi/commit/f82ed77000b520046918b4e75cd733a2a7650d5b"><code>f82ed77</code></a>
Fix duplicated imported linear memories and tables (<a
href="https://github-redirect.dependabot.com/paritytech/wasmi/issues/593">#593</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/paritytech/wasmi/compare/v0.20.0...v0.21.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>
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
2023-01-10 15:04:05 -03:00
dependabot[bot] 23a2347f1f Update wasmparser requirement from 0.95 to 0.96 (#41)
Updates the requirements on
[wasmparser](https://github.com/bytecodealliance/wasm-tools) to permit
the latest version.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/bd3208f0f30dff710e1c28e13a20cded24a38db5"><code>bd3208f</code></a>
Bump some crate versions (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/865">#865</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/6b965ce03b9fc8d3b94eb967eb50285f914ffd0b"><code>6b965ce</code></a>
Fix fuzzing errors (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/862">#862</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/cd44f7326316e652fc90778455a466bcb8272640"><code>cd44f73</code></a>
Consolidate list-reading functions into <code>read_iter</code> (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/860">#860</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/e59094c01101732edd757cedf39e7390013669de"><code>e59094c</code></a>
Implement infrastructure fro a <code>use</code> keyword in
<code>*.wit</code> (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/858">#858</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/24d48083cea015bd62887f9b141caf7a18e5505e"><code>24d4808</code></a>
[wasmparser] Reduce the size of TypeId for better validation performance
(<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/844">#844</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/2de95fe4b749b175f4038006a32c2ecf33a66c5a"><code>2de95fe</code></a>
Cleanup skipping methods in <code>BinaryReader</code> (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/861">#861</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/f234d0c9b531213f35e10177c8f2582c5f3ab58f"><code>f234d0c</code></a>
Remove a large amount of boilerplate parsing from
<code>wasmparser</code> (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/857">#857</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/8e3f8d83fc6a67494374eda8925ed57811d786eb"><code>8e3f8d8</code></a>
Remove <code>deterministic</code> crate feature from `wasmparser (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/854">#854</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/4ac65e93fa1890c0749c2579e0dcbc2bffd7e4d1"><code>4ac65e9</code></a>
Add debug names to shim module in <code>wit-component</code> (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/853">#853</a>)</li>
<li><a
href="https://github.com/bytecodealliance/wasm-tools/commit/e5ffae8f4d30ba7e25922209268d31dc18bcedfd"><code>e5ffae8</code></a>
wasmparser: split parsers for different elems (<a
href="https://github-redirect.dependabot.com/bytecodealliance/wasm-tools/issues/849">#849</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/bytecodealliance/wasm-tools/compare/wasmparser-0.95.0...wasmparser-0.96.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>
2022-12-15 15:12:07 +01:00
Sasha Gryaznov 54c4f8f878 Patch: use checked sum for locals counter (#40)
follow-up patch to #38

Co-authored-by: Alexander Theißen <alex.theissen@me.com>
2022-12-08 11:58:02 +01:00
Sasha Gryaznov 6a79d1d4b8 Charge gas for local variables on the callee side (#38)
Co-authored-by: Alexander Theißen <alex.theissen@me.com>
2022-11-26 16:37:31 +01:00
dependabot[bot] b51701088e Update wasmparser requirement from 0.94 to 0.95 (#37)
Updates the requirements on [wasmparser](https://github.com/bytecodealliance/wasm-tools) to permit the latest version.
- [Release notes](https://github.com/bytecodealliance/wasm-tools/releases)
- [Commits](https://github.com/bytecodealliance/wasm-tools/compare/wasmparser-0.94.0...wasmparser-0.95.0)

---
updated-dependencies:
- dependency-name: wasmparser
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-23 00:35:05 +01:00
Sasha Gryaznov a4dde28607 Add new gas metering method: mutable global + local gas function (#34)
* 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>
2022-11-20 15:00:10 +01:00
dependabot[bot] 90cb67d5d7 Update wasmparser requirement from 0.92 to 0.94 (#36)
* Update wasmparser requirement from 0.92 to 0.94

Updates the requirements on [wasmparser](https://github.com/bytecodealliance/wasm-tools) to permit the latest version.
- [Release notes](https://github.com/bytecodealliance/wasm-tools/releases)
- [Commits](https://github.com/bytecodealliance/wasm-tools/compare/wasmparser-0.92.0...wasmparser-0.94.0)

---
updated-dependencies:
- dependency-name: wasmparser
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix whitespace differences in tests

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>
2022-11-10 09:35:58 +01:00
dependabot[bot] 4c1d47a618 Update wasmparser requirement from 0.90 to 0.92 (#33)
Updates the requirements on [wasmparser](https://github.com/bytecodealliance/wasm-tools) to permit the latest version.
- [Release notes](https://github.com/bytecodealliance/wasm-tools/releases)
- [Commits](https://github.com/bytecodealliance/wasm-tools/compare/wasmparser-0.90.0...wasmparser-0.92.0)

---
updated-dependencies:
- dependency-name: wasmparser
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-10 11:22:57 +02:00
dependabot[bot] 840af19d4b Update criterion requirement from 0.3 to 0.4 (#31)
Updates the requirements on [criterion](https://github.com/bheisler/criterion.rs) to permit the latest version.
- [Release notes](https://github.com/bheisler/criterion.rs/releases)
- [Changelog](https://github.com/bheisler/criterion.rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bheisler/criterion.rs/compare/0.3.0...0.4.0)

---
updated-dependencies:
- dependency-name: criterion
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-14 12:00:09 +02:00
Alexander Theißen 0229f865b6 Use u64 for gas counter (#30)
* Use `u64` for gas counter

* Update doc
2022-09-11 14:36:06 +02:00
dependabot[bot] c2db4b8365 Update wasmparser requirement from 0.89 to 0.90 (#28)
Updates the requirements on [wasmparser](https://github.com/bytecodealliance/wasm-tools) to permit the latest version.
- [Release notes](https://github.com/bytecodealliance/wasm-tools/releases)
- [Commits](https://github.com/bytecodealliance/wasm-tools/compare/wasmparser-0.89.0...wasmparser-0.90.0)

---
updated-dependencies:
- dependency-name: wasmparser
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-24 08:59:46 +02:00
dependabot[bot] 1ade161da4 Update wasmparser requirement from 0.88 to 0.89 (#27)
Updates the requirements on [wasmparser](https://github.com/bytecodealliance/wasm-tools) to permit the latest version.
- [Release notes](https://github.com/bytecodealliance/wasm-tools/releases)
- [Commits](https://github.com/bytecodealliance/wasm-tools/compare/wasmparser-0.88.0...wasmparser-0.89.0)

---
updated-dependencies:
- dependency-name: wasmparser
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-17 14:08:30 +02:00
dependabot[bot] 25ff883bbd Update wasmparser requirement from 0.87 to 0.88 (#26)
Updates the requirements on [wasmparser](https://github.com/bytecodealliance/wasm-tools) to permit the latest version.
- [Release notes](https://github.com/bytecodealliance/wasm-tools/releases)
- [Commits](https://github.com/bytecodealliance/wasm-tools/compare/wasmparser-0.87.0...wasmparser-0.88.0)

---
updated-dependencies:
- dependency-name: wasmparser
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-30 17:39:07 +02:00
dependabot[bot] 3b932b11ad Update wasmparser requirement from 0.86 to 0.87 (#24)
Updates the requirements on [wasmparser](https://github.com/bytecodealliance/wasm-tools) to permit the latest version.
- [Release notes](https://github.com/bytecodealliance/wasm-tools/releases)
- [Commits](https://github.com/bytecodealliance/wasm-tools/compare/wasmparser-0.86.0...wasmparser-0.87.0)

---
updated-dependencies:
- dependency-name: wasmparser
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-06 11:21:44 +02:00
Alexander Theißen d10bbdf554 Fix CODEOWNERS 2022-06-21 14:21:59 +02:00
dependabot[bot] 28ef7f550c Update wasmparser requirement from 0.84 to 0.86 (#23)
Updates the requirements on [wasmparser](https://github.com/bytecodealliance/wasm-tools) to permit the latest version.
- [Release notes](https://github.com/bytecodealliance/wasm-tools/releases)
- [Commits](https://github.com/bytecodealliance/wasm-tools/compare/wasmparser-0.84.0...wasmparser-0.86.0)

---
updated-dependencies:
- dependency-name: wasmparser
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-12 20:24:01 +01:00
Filipe Azevedo 4a394c5f88 bump version (#22) 2022-06-08 10:29:51 +02:00
Alexander Theißen d1648be274 Fix publish 2022-06-06 16:16:30 +01:00
59 changed files with 2028 additions and 437 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
# For details about syntax, see:
# https://help.github.com/en/articles/about-code-owners
/ @athei @pepyakin
* @athei @pepyakin
+41 -26
View File
@@ -11,7 +11,7 @@ env:
jobs:
rustfmt:
runs-on: "ubuntu-latest"
runs-on: "ubuntu_20_64_core"
steps:
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
@@ -20,9 +20,9 @@ jobs:
toolchain: nightly
components: rustfmt
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Cargo fmt
- name: Fmt
uses: actions-rs/cargo@v1
with:
toolchain: nightly
@@ -30,7 +30,7 @@ jobs:
args: --all -- --check
clippy:
runs-on: "ubuntu-latest"
runs-on: "ubuntu_20_64_core"
steps:
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
@@ -38,60 +38,75 @@ jobs:
profile: minimal
toolchain: stable
components: clippy
default: true
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Cargo clippy
uses: actions-rs/cargo@v1
- name: Clippy
uses: actions-rs/clippy-check@v1
with:
toolchain: stable
command: clippy
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-targets --all-features -- -D warnings
test:
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
toolchain: ["stable", "nightly"]
runs-on: ${{ matrix.os }}
build:
runs-on: "ubuntu_20_64_core"
steps:
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
target: wasm32-unknown-unknown
toolchain: ${{ matrix.toolchain }}
toolchain: stable
default: true
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Cargo build
uses: actions-rs/cargo@v1
with:
toolchain: ${{ matrix.toolchain }}
command: build
- name: Cargo build (std)
uses: actions-rs/cargo@v1
with:
command: build
args: --all-features
- name: Cargo build (no_std)
uses: actions-rs/cargo@v1
with:
toolchain: ${{ matrix.toolchain }}
command: build
args: --no-default-features
- name: Cargo build (wasm)
uses: actions-rs/cargo@v1
with:
toolchain: ${{ matrix.toolchain }}
command: build
args: --no-default-features --target wasm32-unknown-unknown
test:
strategy:
matrix:
os: ["ubuntu_20_64_core", "macos-latest", "windows-latest"]
runs-on: ${{ matrix.os }}
steps:
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
default: true
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v4
- name: Cargo test
uses: actions-rs/cargo@v1
with:
toolchain: ${{ matrix.toolchain }}
command: test
args: --all-features
+1
View File
@@ -4,3 +4,4 @@ target
.DS_Store
.idea
.vscode
*~
+91
View File
@@ -0,0 +1,91 @@
# Benchmarks
## Table of Contents
- [Benchmark Results](#benchmark-results)
- [coremark, instrumented](#coremark,-instrumented)
- [recursive_ok, instrumented](#recursive_ok,-instrumented)
- [fibonacci_recursive, instrumented](#fibonacci_recursive,-instrumented)
- [factorial_recursive, instrumented](#factorial_recursive,-instrumented)
- [count_until, instrumented](#count_until,-instrumented)
- [memory_vec_add, instrumented](#memory_vec_add,-instrumented)
- [wasm_kernel::tiny_keccak, instrumented](#wasm_kernel::tiny_keccak,-instrumented)
- [global_bump, instrumented](#global_bump,-instrumented)
## Instrumented Modules sizes
| fixture | original size | gas metered/host fn | gas metered/mut global | size diff |
|------------------------------|------------------|---------------------|------------------------|-----------|
| recursive_ok.wat | 0 kb | 0 kb (137%) | 0 kb (177%) | +29% |
| count_until.wat | 0 kb | 0 kb (125%) | 0 kb (153%) | +21% |
| global_bump.wat | 0 kb | 0 kb (123%) | 0 kb (145%) | +18% |
| memory-vec-add.wat | 0 kb | 0 kb (116%) | 0 kb (134%) | +15% |
| factorial.wat | 0 kb | 0 kb (125%) | 0 kb (145%) | +15% |
| fibonacci.wat | 0 kb | 0 kb (121%) | 0 kb (134%) | +10% |
| contract_terminate.wasm | 1 kb | 1 kb (110%) | 1 kb (112%) | +2% |
| coremark_minimal.wasm | 7 kb | 8 kb (114%) | 8 kb (115%) | +0% |
| trait_erc20.wasm | 10 kb | 11 kb (108%) | 11 kb (108%) | +0% |
| rand_extension.wasm | 4 kb | 5 kb (109%) | 5 kb (109%) | +0% |
| multisig.wasm | 27 kb | 30 kb (110%) | 30 kb (110%) | +0% |
| wasm_kernel.wasm | 779 kb | 787 kb (100%) | 795 kb (101%) | +0% |
| many_blocks.wasm | 1023 kb | 2389 kb (233%) | 2389 kb (233%) | +0% |
| contract_transfer.wasm | 7 kb | 8 kb (113%) | 8 kb (113%) | +0% |
| erc1155.wasm | 26 kb | 29 kb (111%) | 29 kb (111%) | +0% |
| erc20.wasm | 9 kb | 10 kb (108%) | 10 kb (109%) | +0% |
| dns.wasm | 10 kb | 11 kb (108%) | 11 kb (108%) | +0% |
| proxy.wasm | 3 kb | 4 kb (108%) | 4 kb (109%) | +0% |
| erc721.wasm | 13 kb | 14 kb (108%) | 14 kb (108%) | +0% |
## Benchmark Results
### coremark, instrumented
| | `with host_function::Injector` | `with mutable_global::Injector` |
|:-------|:----------------------------------------|:----------------------------------------- |
| | `20.81 s` (✅ **1.00x**) | `20.20 s` (✅ **1.03x faster**) |
### recursive_ok, instrumented
| | `with host_function::Injector` | `with mutable_global::Injector` |
|:-------|:----------------------------------------|:----------------------------------------- |
| | `367.11 us` (✅ **1.00x**) | `585.39 us` (❌ *1.59x slower*) |
### fibonacci_recursive, instrumented
| | `with host_function::Injector` | `with mutable_global::Injector` |
|:-------|:----------------------------------------|:----------------------------------------- |
| | `9.15 us` (✅ **1.00x**) | `13.56 us` (❌ *1.48x slower*) |
### factorial_recursive, instrumented
| | `with host_function::Injector` | `with mutable_global::Injector` |
|:-------|:----------------------------------------|:----------------------------------------- |
| | `1.50 us` (✅ **1.00x**) | `1.98 us` (❌ *1.32x slower*) |
### count_until, instrumented
| | `with host_function::Injector` | `with mutable_global::Injector` |
|:-------|:----------------------------------------|:----------------------------------------- |
| | `5.03 ms` (✅ **1.00x**) | `8.13 ms` (❌ *1.62x slower*) |
### memory_vec_add, instrumented
| | `with host_function::Injector` | `with mutable_global::Injector` |
|:-------|:----------------------------------------|:----------------------------------------- |
| | `6.21 ms` (✅ **1.00x**) | `8.45 ms` (❌ *1.36x slower*) |
### wasm_kernel::tiny_keccak, instrumented
| | `with host_function::Injector` | `with mutable_global::Injector` |
|:-------|:----------------------------------------|:----------------------------------------- |
| | `925.22 us` (✅ **1.00x**) | `1.08 ms` (❌ *1.17x slower*) |
### global_bump, instrumented
| | `with host_function::Injector` | `with mutable_global::Injector` |
|:-------|:----------------------------------------|:----------------------------------------- |
| | `3.79 ms` (✅ **1.00x**) | `7.03 ms` (❌ *1.86x slower*) |
---
Made with [criterion-table](https://github.com/nu11ptr/criterion-table)
+20 -1
View File
@@ -16,7 +16,26 @@ The interface provided to smart contracts will adhere to semver with one excepti
major version bumps will be backwards compatible with regard to already deployed contracts.
In other words: Upgrading this pallet will not break pre-existing contracts.
## [v0.1.2] 2022-06-06
## [Unreleased]
### New
- Add new gas metering method: mutable global + local gas function
[#34](https://github.com/paritytech/wasm-instrument/pull/34)
- Account for locals initialization costs
[#38](https://github.com/paritytech/wasm-instrument/pull/38)
## [v0.3.0]
### Changed
- Use 64bit arithmetic for per-block gas counter
[#30](https://github.com/paritytech/wasm-instrument/pull/30)
## [v0.2.0] 2022-06-06
### Changed
- Adjust debug information (if already parsed) when injecting gas metering
[#16](https://github.com/paritytech/wasm-instrument/pull/16)
+16 -5
View File
@@ -1,6 +1,6 @@
[package]
name = "wasm-instrument"
version = "0.1.2"
version = "0.4.0"
edition = "2021"
rust-version = "1.56.1"
authors = ["Parity Technologies <admin@parity.io>"]
@@ -12,8 +12,14 @@ repository = "https://github.com/paritytech/wasm-instrument"
include = ["src/**/*", "LICENSE-*", "README.md"]
[[bench]]
name = "benches"
name = "instrumentation"
harness = false
path = "benches/instrumentation.rs"
[[bench]]
name = "execution"
harness = false
path = "benches/execution.rs"
[profile.bench]
lto = "fat"
@@ -24,14 +30,19 @@ parity-wasm = { version = "0.45", default-features = false }
[dev-dependencies]
binaryen = "0.12"
criterion = "0.3"
criterion = "0.5"
diff = "0.1"
pretty_assertions = "1"
rand = "0.8"
wat = "1"
wasmparser = "0.84"
wasmprinter = "0.2"
wasmparser = "0.206"
wasmprinter = "0.200"
wasmi = "0.31"
[features]
default = ["std"]
std = ["parity-wasm/std"]
sign_ext = ["parity-wasm/sign_ext"]
[lib]
bench = false
+437
View File
@@ -0,0 +1,437 @@
use criterion::{
criterion_group, criterion_main, measurement::Measurement, Bencher, BenchmarkGroup, Criterion,
};
use std::{
fs::read,
path::PathBuf,
time::{Duration, SystemTime, UNIX_EPOCH},
};
use wasm_instrument::{
gas_metering::{self, host_function, mutable_global, ConstantCostRules},
parity_wasm::{deserialize_buffer, elements::Module, serialize},
};
use wasmi::{
core::{Pages, TrapCode, F32},
Caller, Config, Engine, Instance, Linker, Memory, StackLimits, Store, TypedFunc, Value,
};
/// Describes a gas metering strategy we want to benchmark.
///
/// Most strategies just need a subset of these functions. Hence we added default
/// implementations for all of them.
trait MeteringStrategy {
/// The wasmi config we should be using for this strategy.
fn config() -> Config {
Config::default()
}
/// The strategy may or may not want to instrument the module.
fn instrument_module(module: Module) -> Module {
module
}
/// The strategy might need to define additional host functions.
fn define_host_funcs(_linker: &mut Linker<u64>) {}
/// The strategy might need to do some initialization of the wasm instance.
fn init_instance(_module: &mut BenchInstance) {}
}
/// Don't do any metering at all. This is helpful as a baseline.
struct NoMetering;
/// Use wasmi's builtin fuel metering.
struct WasmiMetering;
/// Instrument the module using [`host_function::Injector`].
struct HostFunctionMetering;
/// Instrument the module using [`mutable_global::Injector`].
struct MutableGlobalMetering;
impl MeteringStrategy for NoMetering {}
impl MeteringStrategy for WasmiMetering {
fn config() -> Config {
let mut config = Config::default();
config.consume_fuel(true);
config
}
fn init_instance(module: &mut BenchInstance) {
module.store.add_fuel(u64::MAX).unwrap();
}
}
impl MeteringStrategy for HostFunctionMetering {
fn instrument_module(module: Module) -> Module {
let backend = host_function::Injector::new("env", "gas");
gas_metering::inject(module, backend, &ConstantCostRules::default()).unwrap()
}
fn define_host_funcs(linker: &mut Linker<u64>) {
// the instrumentation relies on the existing of this function
linker
.func_wrap("env", "gas", |mut caller: Caller<'_, u64>, amount_consumed: u64| {
let gas_remaining = caller.data_mut();
*gas_remaining =
gas_remaining.checked_sub(amount_consumed).ok_or(TrapCode::OutOfFuel)?;
Ok(())
})
.unwrap();
}
}
impl MeteringStrategy for MutableGlobalMetering {
fn instrument_module(module: Module) -> Module {
let backend = mutable_global::Injector::new("gas_left");
gas_metering::inject(module, backend, &ConstantCostRules::default()).unwrap()
}
fn init_instance(module: &mut BenchInstance) {
// the instrumentation relies on the host to initialize the global with the gas limit
// we just init to the maximum so it will never run out
module
.instance
.get_global(&mut module.store, "gas_left")
.unwrap()
.set(&mut module.store, Value::I64(-1i64)) // the same as u64::MAX
.unwrap();
}
}
/// A wasm instance ready to be benchmarked.
struct BenchInstance {
store: Store<u64>,
instance: Instance,
}
impl BenchInstance {
/// Create a new instance for the supplied metering strategy.
///
/// `wasm`: The raw wasm module for the benchmark.
/// `define_host_func`: In here the caller can define additional host function.
fn new<S, H>(wasm: &[u8], define_host_funcs: &H) -> Self
where
S: MeteringStrategy,
H: Fn(&mut Linker<u64>),
{
let module = deserialize_buffer(wasm).unwrap();
let instrumented_module = S::instrument_module(module);
let input = serialize(instrumented_module).unwrap();
let mut config = S::config();
config.set_stack_limits(StackLimits::new(1024, 1024 * 1024, 64 * 1024).unwrap());
let engine = Engine::new(&config);
let module = wasmi::Module::new(&engine, &mut &input[..]).unwrap();
let mut linker = Linker::new(&engine);
S::define_host_funcs(&mut linker);
define_host_funcs(&mut linker);
// init host state with maximum gas_left (only used by host_function instrumentation)
let mut store = Store::new(&engine, u64::MAX);
let instance = linker.instantiate(&mut store, &module).unwrap().start(&mut store).unwrap();
let mut bench_module = Self { store, instance };
S::init_instance(&mut bench_module);
bench_module
}
}
/// Runs a benchmark for every strategy.
///
/// We require the closures to implement `Fn` as they are executed for every strategy and we
/// don't want them to change in between.
///
/// `group`: The benchmark group within the benchmarks will be executed.
/// `wasm`: The raw wasm module for the benchmark.
/// `define_host_func`: In here the caller can define additional host function.
/// `f`: In here the user should perform the benchmark. Will be executed for every strategy.
fn for_strategies<M, H, F>(group: &mut BenchmarkGroup<M>, wasm: &[u8], define_host_funcs: H, f: F)
where
M: Measurement,
H: Fn(&mut Linker<u64>),
F: Fn(&mut Bencher<M>, &mut BenchInstance),
{
let mut module = BenchInstance::new::<NoMetering, _>(wasm, &define_host_funcs);
group.bench_function("no_metering", |bench| f(bench, &mut module));
let mut module = BenchInstance::new::<WasmiMetering, _>(wasm, &define_host_funcs);
group.bench_function("wasmi_builtin", |bench| f(bench, &mut module));
let mut module = BenchInstance::new::<HostFunctionMetering, _>(wasm, &define_host_funcs);
group.bench_function("host_function", |bench| f(bench, &mut module));
let mut module = BenchInstance::new::<MutableGlobalMetering, _>(wasm, &define_host_funcs);
group.bench_function("mutable_global", |bench| f(bench, &mut module));
}
/// Converts the `.wat` encoded `bytes` into `.wasm` encoded bytes.
fn wat2wasm(bytes: &[u8]) -> Vec<u8> {
wat::parse_bytes(bytes).unwrap().into_owned()
}
fn fixture_dir() -> PathBuf {
let mut path = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
path.push("benches");
path.push("fixtures");
path.push("wasm");
path
}
fn gas_metered_coremark(c: &mut Criterion) {
let mut group = c.benchmark_group("coremark");
// Benchmark host_function::Injector
let wasm_filename = "coremark_minimal.wasm";
let bytes = read(fixture_dir().join(wasm_filename)).unwrap();
let define_host_funcs = |linker: &mut Linker<u64>| {
linker
.func_wrap("env", "clock_ms", || {
SystemTime::now().duration_since(UNIX_EPOCH).unwrap().as_millis() as u64
})
.unwrap();
};
for_strategies(&mut group, &bytes, define_host_funcs, |bench, module| {
bench.iter(|| {
let run = module.instance.get_typed_func::<(), F32>(&mut module.store, "run").unwrap();
// Call the wasm!
run.call(&mut module.store, ()).unwrap();
})
});
}
fn gas_metered_recursive_ok(c: &mut Criterion) {
let mut group = c.benchmark_group("recursive_ok");
const RECURSIVE_DEPTH: i32 = 8000;
let wasm_bytes = wat2wasm(include_bytes!("fixtures/wat/recursive_ok.wat"));
for_strategies(
&mut group,
&wasm_bytes,
|_| {},
|bench, module| {
let bench_call =
module.instance.get_typed_func::<i32, i32>(&module.store, "call").unwrap();
bench.iter(|| {
let result = bench_call.call(&mut module.store, RECURSIVE_DEPTH).unwrap();
assert_eq!(result, 0);
})
},
);
}
fn gas_metered_fibonacci_recursive(c: &mut Criterion) {
let mut group = c.benchmark_group("fibonacci_recursive");
const FIBONACCI_REC_N: i64 = 10;
let wasm_bytes = wat2wasm(include_bytes!("fixtures/wat/fibonacci.wat"));
for_strategies(
&mut group,
&wasm_bytes,
|_| {},
|bench, module| {
let bench_call = module
.instance
.get_typed_func::<i64, i64>(&module.store, "fib_recursive")
.unwrap();
bench.iter(|| {
bench_call.call(&mut module.store, FIBONACCI_REC_N).unwrap();
});
},
);
}
fn gas_metered_fac_recursive(c: &mut Criterion) {
let mut group = c.benchmark_group("factorial_recursive");
let wasm_bytes = wat2wasm(include_bytes!("fixtures/wat/factorial.wat"));
for_strategies(
&mut group,
&wasm_bytes,
|_| {},
|bench, module| {
let fac = module
.instance
.get_typed_func::<i64, i64>(&module.store, "recursive_factorial")
.unwrap();
bench.iter(|| {
let result = fac.call(&mut module.store, 25).unwrap();
assert_eq!(result, 7034535277573963776);
})
},
);
}
fn gas_metered_count_until(c: &mut Criterion) {
const COUNT_UNTIL: i32 = 100_000;
let mut group = c.benchmark_group("count_until");
let wasm_bytes = wat2wasm(include_bytes!("fixtures/wat/count_until.wat"));
for_strategies(
&mut group,
&wasm_bytes,
|_| {},
|bench, module| {
let count_until = module
.instance
.get_typed_func::<i32, i32>(&module.store, "count_until")
.unwrap();
bench.iter(|| {
let result = count_until.call(&mut module.store, COUNT_UNTIL).unwrap();
assert_eq!(result, COUNT_UNTIL);
})
},
);
}
fn gas_metered_vec_add(c: &mut Criterion) {
fn test_for<A, B>(
b: &mut Bencher,
vec_add: TypedFunc<(i32, i32, i32, i32), ()>,
mut store: &mut Store<u64>,
mem: Memory,
len: usize,
vec_a: A,
vec_b: B,
) where
A: IntoIterator<Item = i32>,
B: IntoIterator<Item = i32>,
{
use core::mem::size_of;
let ptr_result = 10;
let len_result = len * size_of::<i64>();
let ptr_a = ptr_result + len_result;
let len_a = len * size_of::<i32>();
let ptr_b = ptr_a + len_a;
// Reset `result` buffer to zeros:
mem.data_mut(&mut store)[ptr_result..ptr_result + (len * size_of::<i32>())].fill(0);
// Initialize `a` buffer:
for (n, a) in vec_a.into_iter().take(len).enumerate() {
mem.write(&mut store, ptr_a + (n * size_of::<i32>()), &a.to_le_bytes()).unwrap();
}
// Initialize `b` buffer:
for (n, b) in vec_b.into_iter().take(len).enumerate() {
mem.write(&mut store, ptr_b + (n * size_of::<i32>()), &b.to_le_bytes()).unwrap();
}
// Prepare parameters and all Wasm `vec_add`:
let params = (ptr_result as i32, ptr_a as i32, ptr_b as i32, len as i32);
b.iter(|| {
vec_add.call(&mut store, params).unwrap();
});
// Validate the result buffer:
for n in 0..len {
let mut buffer4 = [0x00; 4];
let mut buffer8 = [0x00; 8];
let a = {
mem.read(&store, ptr_a + (n * size_of::<i32>()), &mut buffer4).unwrap();
i32::from_le_bytes(buffer4)
};
let b = {
mem.read(&store, ptr_b + (n * size_of::<i32>()), &mut buffer4).unwrap();
i32::from_le_bytes(buffer4)
};
let actual_result = {
mem.read(&store, ptr_result + (n * size_of::<i64>()), &mut buffer8).unwrap();
i64::from_le_bytes(buffer8)
};
let expected_result = (a as i64) + (b as i64);
assert_eq!(
expected_result, actual_result,
"given a = {a} and b = {b}, results diverge at index {n}"
);
}
}
let mut group = c.benchmark_group("memory_vec_add");
let wasm_bytes = wat2wasm(include_bytes!("fixtures/wat/memory-vec-add.wat"));
const LEN: usize = 100_000;
for_strategies(
&mut group,
&wasm_bytes,
|_| {},
|bench, module| {
let vec_add = module
.instance
.get_typed_func::<(i32, i32, i32, i32), ()>(&module.store, "vec_add")
.unwrap();
let mem = module.instance.get_memory(&module.store, "mem").unwrap();
mem.grow(&mut module.store, Pages::new(25).unwrap()).unwrap();
test_for(
bench,
vec_add,
&mut module.store,
mem,
LEN,
(0..LEN).map(|i| (i * i) as i32),
(0..LEN).map(|i| (i * 10) as i32),
)
},
);
}
fn gas_metered_tiny_keccak(c: &mut Criterion) {
let mut group = c.benchmark_group("wasm_kernel::tiny_keccak");
let wasm_filename = "wasm_kernel.wasm";
let wasm_bytes = read(fixture_dir().join(wasm_filename)).unwrap();
for_strategies(
&mut group,
&wasm_bytes,
|_| {},
|bench, module| {
let prepare = module
.instance
.get_typed_func::<(), i32>(&module.store, "prepare_tiny_keccak")
.unwrap();
let keccak = module
.instance
.get_typed_func::<i32, ()>(&module.store, "bench_tiny_keccak")
.unwrap();
let test_data_ptr = prepare.call(&mut module.store, ()).unwrap();
bench.iter(|| {
keccak.call(&mut module.store, test_data_ptr).unwrap();
})
},
);
}
fn gas_metered_global_bump(c: &mut Criterion) {
const BUMP_AMOUNT: i32 = 100_000;
let mut group = c.benchmark_group("global_bump");
let wasm_bytes = wat2wasm(include_bytes!("fixtures/wat/global_bump.wat"));
for_strategies(
&mut group,
&wasm_bytes,
|_| {},
|bench, module| {
let bump = module.instance.get_typed_func::<i32, i32>(&module.store, "bump").unwrap();
bench.iter(|| {
let result = bump.call(&mut module.store, BUMP_AMOUNT).unwrap();
assert_eq!(result, BUMP_AMOUNT);
})
},
);
}
criterion_group!(
name = coremark;
config = Criterion::default()
.sample_size(10)
.measurement_time(Duration::from_millis(275000))
.warm_up_time(Duration::from_millis(1000));
targets =
gas_metered_coremark,
);
criterion_group!(
name = wasmi_fixtures;
config = Criterion::default()
.sample_size(10)
.measurement_time(Duration::from_millis(250000))
.warm_up_time(Duration::from_millis(1000));
targets =
gas_metered_recursive_ok,
gas_metered_fibonacci_recursive,
gas_metered_fac_recursive,
gas_metered_count_until,
gas_metered_vec_add,
gas_metered_tiny_keccak,
gas_metered_global_bump,
);
criterion_main!(coremark, wasmi_fixtures);
Binary file not shown.
Binary file not shown.
+25
View File
@@ -0,0 +1,25 @@
;; Exports a function `count_until` that takes an input `n`.
;; The exported function counts an integer `n` times and then returns `n`.
(module
(func $count_until (export "count_until") (param $limit i32) (result i32)
(local $counter i32)
(block
(loop
(br_if
1
(i32.eq
(local.tee $counter
(i32.add
(local.get $counter)
(i32.const 1)
)
)
(local.get $limit)
)
)
(br 0)
)
)
(return (local.get $counter))
)
)
+35
View File
@@ -0,0 +1,35 @@
(module
;; Iterative factorial function, does not use recursion.
(func (export "iterative_factorial") (param i64) (result i64)
(local i64)
(local.set 1 (i64.const 1))
(block
(br_if 0 (i64.lt_s (local.get 0) (i64.const 2)))
(loop
(local.set 1 (i64.mul (local.get 1) (local.get 0)))
(local.set 0 (i64.add (local.get 0) (i64.const -1)))
(br_if 0 (i64.gt_s (local.get 0) (i64.const 1)))
)
)
(local.get 1)
)
;; Recursive trivial factorial function.
(func $rec_fac (export "recursive_factorial") (param i64) (result i64)
(if (result i64)
(i64.eq (local.get 0) (i64.const 0))
(then (i64.const 1))
(else
(i64.mul
(local.get 0)
(call $rec_fac
(i64.sub
(local.get 0)
(i64.const 1)
)
)
)
)
)
)
)
+47
View File
@@ -0,0 +1,47 @@
(module
(func $fib_recursive (export "fib_recursive") (param $N i64) (result i64)
(if
(i64.le_s (local.get $N) (i64.const 1))
(then (return (local.get $N)))
)
(return
(i64.add
(call $fib_recursive
(i64.sub (local.get $N) (i64.const 1))
)
(call $fib_recursive
(i64.sub (local.get $N) (i64.const 2))
)
)
)
)
(func $fib_iterative (export "fib_iterative") (param $N i64) (result i64)
(local $n1 i64)
(local $n2 i64)
(local $tmp i64)
(local $i i64)
;; return $N for N <= 1
(if
(i64.le_s (local.get $N) (i64.const 1))
(then (return (local.get $N)))
)
(local.set $n1 (i64.const 1))
(local.set $n2 (i64.const 1))
(local.set $i (i64.const 2))
;;since we normally return n2, handle n=1 case specially
(loop $again
(if
(i64.lt_s (local.get $i) (local.get $N))
(then
(local.set $tmp (i64.add (local.get $n1) (local.get $n2)))
(local.set $n1 (local.get $n2))
(local.set $n2 (local.get $tmp))
(local.set $i (i64.add (local.get $i) (i64.const 1)))
(br $again)
)
)
)
(local.get $n2)
)
)
+27
View File
@@ -0,0 +1,27 @@
;; Exports a function `bump` that takes an input `n`.
;; The exported function bumps a global variable `n` times and then returns it.
(module
(global $g (mut i32) (i32.const 0))
(func $bump (export "bump") (param $n i32) (result i32)
(global.set $g (i32.const 0))
(block $break
(loop $continue
(br_if ;; if $g == $n then break
$break
(i32.eq
(global.get $g)
(local.get $n)
)
)
(global.set $g ;; $g += 1
(i32.add
(global.get $g)
(i32.const 1)
)
)
(br $continue)
)
)
(return (global.get $g))
)
)
+58
View File
@@ -0,0 +1,58 @@
;; Exports a function `vec_add` that computes the addition of 2 vectors
;; of length `len` starting at `ptr_a` and `ptr_b` and stores the result
;; into a buffer of the same length starting at `ptr_result`.
(module
(memory (export "mem") 1)
(func (export "vec_add")
(param $ptr_result i32)
(param $ptr_a i32)
(param $ptr_b i32)
(param $len i32)
(local $n i32)
(block $exit
(loop $loop
(br_if ;; exit loop if $n == $len
$exit
(i32.eq
(local.get $n)
(local.get $len)
)
)
(i64.store offset=0 ;; ptr_result[n] = ptr_a[n] + ptr_b[n]
(i32.add
(local.get $ptr_result)
(i32.mul
(local.get $n)
(i32.const 8)
)
)
(i64.add
(i64.load32_s offset=0 ;; load ptr_a[n]
(i32.add
(local.get $ptr_a)
(i32.mul
(local.get $n)
(i32.const 4)
)
)
)
(i64.load32_s offset=0 ;; load ptr_b[n]
(i32.add
(local.get $ptr_b)
(i32.mul
(local.get $n)
(i32.const 4)
)
)
)
)
)
(local.set $n ;; increment n
(i32.add (local.get $n) (i32.const 1))
)
(br $loop) ;; continue loop
)
)
(return)
)
)
+22
View File
@@ -0,0 +1,22 @@
;; Exports a function `call` that takes an input `n`.
;; The exported function calls itself `n` times.
(module
(func $call (export "call") (param $n i32) (result i32)
(if (result i32)
(local.get $n)
(then
(return
(call $call
(i32.sub
(local.get $n)
(i32.const 1)
)
)
)
)
(else
(return (local.get $n))
)
)
)
)
@@ -7,7 +7,8 @@ use std::{
path::PathBuf,
};
use wasm_instrument::{
gas_metering, inject_stack_limiter,
gas_metering::{self, host_function, ConstantCostRules},
inject_stack_limiter,
parity_wasm::{deserialize_buffer, elements::Module},
};
@@ -15,17 +16,18 @@ fn fixture_dir() -> PathBuf {
let mut path = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
path.push("benches");
path.push("fixtures");
path.push("wasm");
path
}
fn any_fixture<F, M>(group: &mut BenchmarkGroup<M>, f: F)
fn for_fixtures<F, M>(group: &mut BenchmarkGroup<M>, f: F)
where
F: Fn(Module),
M: Measurement,
{
for entry in read_dir(fixture_dir()).unwrap() {
let entry = entry.unwrap();
let bytes = read(&entry.path()).unwrap();
let bytes = read(entry.path()).unwrap();
group.throughput(Throughput::Bytes(bytes.len().try_into().unwrap()));
group.bench_with_input(entry.file_name().to_str().unwrap(), &bytes, |bench, input| {
bench.iter(|| f(deserialize_buffer(input).unwrap()))
@@ -35,14 +37,19 @@ where
fn gas_metering(c: &mut Criterion) {
let mut group = c.benchmark_group("Gas Metering");
any_fixture(&mut group, |module| {
gas_metering::inject(module, &gas_metering::ConstantCostRules::default(), "env").unwrap();
for_fixtures(&mut group, |module| {
gas_metering::inject(
module,
host_function::Injector::new("env", "gas"),
&ConstantCostRules::default(),
)
.unwrap();
});
}
fn stack_height_limiter(c: &mut Criterion) {
let mut group = c.benchmark_group("Stack Height Limiter");
any_fixture(&mut group, |module| {
for_fixtures(&mut group, |module| {
inject_stack_limiter(module, 128).unwrap();
});
}
+139
View File
@@ -0,0 +1,139 @@
//! Provides backends for the gas metering instrumentation
use parity_wasm::elements;
/// Implementation details of the specific method of the gas metering.
#[derive(Clone)]
pub enum GasMeter {
/// Gas metering with an external function.
External {
/// Name of the module to import the gas function from.
module: &'static str,
/// Name of the external gas function to be imported.
function: &'static str,
},
/// Gas metering with a local function and a mutable global.
Internal {
/// Name of the mutable global to be exported.
global: &'static str,
/// Body of the local gas counting function to be injected.
func_instructions: elements::Instructions,
/// Cost of the gas function execution.
cost: u64,
},
}
use super::Rules;
/// Under the hood part of the gas metering mechanics.
pub trait Backend {
/// Provides the gas metering implementation details.
fn gas_meter<R: Rules>(self, module: &elements::Module, rules: &R) -> GasMeter;
}
/// Gas metering with an external host function.
pub mod host_function {
use super::{Backend, GasMeter, Rules};
use parity_wasm::elements::Module;
/// Injects invocations of the gas charging host function into each metering block.
pub struct Injector {
/// The name of the module to import the gas function from.
module: &'static str,
/// The name of the gas function to import.
name: &'static str,
}
impl Injector {
pub fn new(module: &'static str, name: &'static str) -> Self {
Self { module, name }
}
}
impl Backend for Injector {
fn gas_meter<R: Rules>(self, _module: &Module, _rules: &R) -> GasMeter {
GasMeter::External { module: self.module, function: self.name }
}
}
}
/// Gas metering with a mutable global.
///
/// # Note
///
/// Not for all execution engines this method gives performance wins compared to using an [external
/// host function](host_function). See benchmarks and size overhead tests for examples of how to
/// make measurements needed to decide which gas metering method is better for your particular case.
///
/// # Warning
///
/// It is not recommended to apply [stack limiter](crate::inject_stack_limiter) instrumentation to a
/// module instrumented with this type of gas metering. This could lead to a massive module size
/// bloat. This is a known issue to be fixed in upcoming versions.
pub mod mutable_global {
use super::{Backend, GasMeter, Rules};
use alloc::vec;
use parity_wasm::elements::{self, Instruction, Module};
/// Injects a mutable global variable and a local function to the module to track
/// current gas left.
///
/// The function is called in every metering block. In case of falling out of gas, the global is
/// set to the sentinel value `U64::MAX` and `unreachable` instruction is called. The execution
/// engine should take care of getting the current global value and setting it back in order to
/// sync the gas left value during an execution.
pub struct Injector {
/// The export name of the gas tracking global.
pub global_name: &'static str,
}
impl Injector {
pub fn new(global_name: &'static str) -> Self {
Self { global_name }
}
}
impl Backend for Injector {
fn gas_meter<R: Rules>(self, module: &Module, rules: &R) -> GasMeter {
let gas_global_idx = module.globals_space() as u32;
let func_instructions = vec![
Instruction::GetGlobal(gas_global_idx),
Instruction::GetLocal(0),
Instruction::I64GeU,
Instruction::If(elements::BlockType::NoResult),
Instruction::GetGlobal(gas_global_idx),
Instruction::GetLocal(0),
Instruction::I64Sub,
Instruction::SetGlobal(gas_global_idx),
Instruction::Else,
// sentinel val u64::MAX
Instruction::I64Const(-1i64), // non-charged instruction
Instruction::SetGlobal(gas_global_idx), // non-charged instruction
Instruction::Unreachable, // non-charged instruction
Instruction::End,
Instruction::End,
];
// calculate gas used for the gas charging func execution itself
let mut gas_fn_cost = func_instructions.iter().fold(0, |cost: u64, instruction| {
cost.saturating_add(rules.instruction_cost(instruction).unwrap_or(u32::MAX).into())
});
// don't charge for the instructions used to fail when out of gas
let fail_cost = [
Instruction::I64Const(-1i64), // non-charged instruction
Instruction::SetGlobal(gas_global_idx), // non-charged instruction
Instruction::Unreachable, // non-charged instruction
]
.iter()
.fold(0, |cost: u64, instruction| {
cost.saturating_add(rules.instruction_cost(instruction).unwrap_or(u32::MAX).into())
});
// the fail costs are a subset of the overall costs and hence this never underflows
gas_fn_cost -= fail_cost;
GasMeter::Internal {
global: self.global_name,
func_instructions: elements::Instructions::new(func_instructions),
cost: gas_fn_cost,
}
}
}
}
+536 -224
View File
File diff suppressed because it is too large Load Diff
+22 -8
View File
@@ -23,10 +23,10 @@ struct ControlFlowNode {
first_instr_pos: Option<usize>,
/// The actual gas cost of executing all instructions in the basic block.
actual_cost: u32,
actual_cost: u64,
/// The amount of gas charged by the injected metering instructions within this basic block.
charged_cost: u32,
charged_cost: u64,
/// Whether there are any other nodes in the graph that loop back to this one. Every cycle in
/// the control flow graph contains at least one node with this flag set.
@@ -68,10 +68,10 @@ impl ControlFlowGraph {
}
fn increment_actual_cost(&mut self, node_id: NodeId, cost: u32) {
self.get_node_mut(node_id).actual_cost += cost;
self.get_node_mut(node_id).actual_cost += u64::from(cost);
}
fn increment_charged_cost(&mut self, node_id: NodeId, cost: u32) {
fn increment_charged_cost(&mut self, node_id: NodeId, cost: u64) {
self.get_node_mut(node_id).charged_cost += cost;
}
@@ -134,6 +134,14 @@ fn build_control_flow_graph(
let mut stack = vec![ControlFrame::new(entry_node_id, terminal_node_id, false)];
let mut metered_blocks_iter = blocks.iter().peekable();
let locals_count = body
.locals()
.iter()
.try_fold(0u32, |count, val_type| count.checked_add(val_type.count()))
.ok_or(())?;
let locals_init_cost = rules.call_per_local_cost().checked_mul(locals_count).ok_or(())?;
for (cursor, instruction) in body.code().elements().iter().enumerate() {
let active_node_id = stack
.last()
@@ -149,6 +157,10 @@ fn build_control_flow_graph(
graph.increment_charged_cost(active_node_id, next_metered_block.cost);
}
// Add locals initialization cost to the function block.
if cursor == 0 {
graph.increment_actual_cost(active_node_id, locals_init_cost);
}
let instruction_cost = rules.instruction_cost(instruction).ok_or(())?;
match instruction {
Instruction::Block(_) => {
@@ -267,9 +279,9 @@ fn validate_graph_gas_costs(graph: &ControlFlowGraph) -> bool {
fn visit(
graph: &ControlFlowGraph,
node_id: NodeId,
mut total_actual: u32,
mut total_charged: u32,
loop_costs: &mut Map<NodeId, (u32, u32)>,
mut total_actual: u64,
mut total_charged: u64,
loop_costs: &mut Map<NodeId, (u64, u64)>,
) -> bool {
let node = graph.get_node(node_id);
@@ -342,8 +354,10 @@ mod tests {
for func_body in module.code_section().iter().flat_map(|section| section.bodies()) {
let rules = ConstantCostRules::default();
let locals_count = func_body.locals().iter().map(|val_type| val_type.count()).sum();
let metered_blocks = determine_metered_blocks(func_body.code(), &rules).unwrap();
let metered_blocks =
determine_metered_blocks(func_body.code(), &rules, locals_count).unwrap();
let success =
validate_metering_injections(func_body, &rules, &metered_blocks).unwrap();
assert!(success);
+2 -2
View File
@@ -176,7 +176,7 @@ pub fn compute(func_idx: u32, module: &elements::Module) -> Result<u32, &'static
match opcode {
Nop => {},
Block(ty) | Loop(ty) | If(ty) => {
let end_arity = if *ty == BlockType::NoResult { 0 } else { 1 };
let end_arity = u32::from(*ty != BlockType::NoResult);
let branch_arity = if let Loop(_) = *opcode { 0 } else { end_arity };
if let If(_) = *opcode {
stack.pop_values(1)?;
@@ -465,7 +465,7 @@ mod tests {
(memory 0)
(func (result i32)
unreachable
grow_memory
memory.grow
)
)
"#,
+7 -7
View File
@@ -222,8 +222,8 @@ fn instrument_functions(
/// Before:
///
/// ```text
/// get_local 0
/// get_local 1
/// local.get 0
/// local.get 1
/// call 228
/// drop
/// ```
@@ -231,8 +231,8 @@ fn instrument_functions(
/// After:
///
/// ```text
/// get_local 0
/// get_local 1
/// local.get 0
/// local.get 1
///
/// < ... preamble ... >
///
@@ -366,9 +366,9 @@ mod tests {
r#"
(module
(func (export "i32.add") (param i32 i32) (result i32)
get_local 0
get_local 1
i32.add
local.get 0
local.get 1
i32.add
)
)
"#,
+1 -5
View File
@@ -1,12 +1,8 @@
#[cfg(not(features = "std"))]
use alloc::collections::BTreeMap as Map;
use alloc::vec::Vec;
use alloc::{collections::BTreeMap as Map, vec::Vec};
use parity_wasm::{
builder,
elements::{self, FunctionType, Internal},
};
#[cfg(features = "std")]
use std::collections::HashMap as Map;
use super::{resolve_func_type, Context};
+64 -29
View File
@@ -1,10 +1,9 @@
use parity_wasm::elements::Module;
use std::{
fs,
io::{self, Read, Write},
path::{Path, PathBuf},
};
use wasm_instrument::{self as instrument, parity_wasm::elements};
use wasm_instrument::{self as instrument, gas_metering, parity_wasm::elements};
use wasmparser::validate;
fn slurp<P: AsRef<Path>>(path: P) -> io::Result<Vec<u8>> {
@@ -20,18 +19,23 @@ fn dump<P: AsRef<Path>>(path: P, buf: &[u8]) -> io::Result<()> {
Ok(())
}
fn run_diff_test<F: FnOnce(&[u8]) -> Vec<u8>>(test_dir: &str, name: &str, test: F) {
fn run_diff_test<F: FnOnce(&[u8]) -> Vec<u8>>(
test_dir: &str,
in_name: &str,
out_name: &str,
test: F,
) {
let mut fixture_path = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
fixture_path.push("tests");
fixture_path.push("fixtures");
fixture_path.push(test_dir);
fixture_path.push(name);
fixture_path.push(in_name);
let mut expected_path = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
expected_path.push("tests");
expected_path.push("expectations");
expected_path.push(test_dir);
expected_path.push(name);
expected_path.push(out_name);
let fixture_wasm = wat::parse_file(&fixture_path).expect("Failed to read fixture");
validate(&fixture_wasm).expect("Fixture is invalid");
@@ -48,7 +52,7 @@ fn run_diff_test<F: FnOnce(&[u8]) -> Vec<u8>>(test_dir: &str, name: &str, test:
if actual_wat != expected_wat {
println!("difference!");
println!("--- {}", expected_path.display());
println!("+++ {} test {}", test_dir, name);
println!("+++ {} test {}", test_dir, out_name);
for diff in diff::lines(expected_wat, &actual_wat) {
match diff {
diff::Result::Left(l) => println!("-{}", l),
@@ -72,13 +76,18 @@ mod stack_height {
( $name:ident ) => {
#[test]
fn $name() {
run_diff_test("stack-height", concat!(stringify!($name), ".wat"), |input| {
let module =
elements::deserialize_buffer(input).expect("Failed to deserialize");
let instrumented = instrument::inject_stack_limiter(module, 1024)
.expect("Failed to instrument with stack counter");
elements::serialize(instrumented).expect("Failed to serialize")
});
run_diff_test(
"stack-height",
concat!(stringify!($name), ".wat"),
concat!(stringify!($name), ".wat"),
|input| {
let module =
elements::deserialize_buffer(input).expect("Failed to deserialize");
let instrumented = instrument::inject_stack_limiter(module, 1024)
.expect("Failed to instrument with stack counter");
elements::serialize(instrumented).expect("Failed to serialize")
},
);
}
};
}
@@ -96,27 +105,53 @@ mod gas {
use super::*;
macro_rules! def_gas_test {
( $name:ident ) => {
( ($input:ident, $name1:ident, $name2:ident) ) => {
#[test]
fn $name() {
run_diff_test("gas", concat!(stringify!($name), ".wat"), |input| {
let rules = instrument::gas_metering::ConstantCostRules::default();
fn $name1() {
run_diff_test(
"gas",
concat!(stringify!($input), ".wat"),
concat!(stringify!($name1), ".wat"),
|input| {
let rules = gas_metering::ConstantCostRules::default();
let module: Module =
elements::deserialize_buffer(input).expect("Failed to deserialize");
let module = module.parse_names().expect("Failed to parse names");
let module: elements::Module =
elements::deserialize_buffer(input).expect("Failed to deserialize");
let module = module.parse_names().expect("Failed to parse names");
let backend = gas_metering::host_function::Injector::new("env", "gas");
let instrumented = instrument::gas_metering::inject(module, &rules, "env")
.expect("Failed to instrument with gas metering");
elements::serialize(instrumented).expect("Failed to serialize")
});
let instrumented = gas_metering::inject(module, backend, &rules)
.expect("Failed to instrument with gas metering");
elements::serialize(instrumented).expect("Failed to serialize")
},
);
}
#[test]
fn $name2() {
run_diff_test(
"gas",
concat!(stringify!($input), ".wat"),
concat!(stringify!($name2), ".wat"),
|input| {
let rules = gas_metering::ConstantCostRules::default();
let module: elements::Module =
elements::deserialize_buffer(input).expect("Failed to deserialize");
let module = module.parse_names().expect("Failed to parse names");
let backend = gas_metering::mutable_global::Injector::new("gas_left");
let instrumented = gas_metering::inject(module, backend, &rules)
.expect("Failed to instrument with gas metering");
elements::serialize(instrumented).expect("Failed to serialize")
},
);
}
};
}
def_gas_test!(ifs);
def_gas_test!(simple);
def_gas_test!(start);
def_gas_test!(call);
def_gas_test!(branch);
def_gas_test!((ifs, ifs_host_fn, ifs_mut_global));
def_gas_test!((simple, simple_host_fn, simple_mut_global));
def_gas_test!((start, start_host_fn, start_mut_global));
def_gas_test!((call, call_host_fn, call_mut_global));
def_gas_test!((branch, branch_host_fn, branch_mut_global));
}
@@ -1,12 +1,12 @@
(module
(type (;0;) (func (result i32)))
(type (;1;) (func (param i32)))
(type (;1;) (func (param i64)))
(import "env" "gas" (func (;0;) (type 1)))
(func $fibonacci_with_break (;1;) (type 0) (result i32)
(local i32 i32)
i32.const 13
i64.const 15
call 0
block ;; label = @1
block ;; label = @1
i32.const 0
local.set 0
i32.const 1
@@ -18,7 +18,7 @@
local.set 1
i32.const 1
br_if 0 (;@1;)
i32.const 5
i64.const 5
call 0
local.get 0
local.get 1
@@ -0,0 +1,47 @@
(module
(type (;0;) (func (result i32)))
(type (;1;) (func (param i64)))
(func $fibonacci_with_break (;0;) (type 0) (result i32)
(local $x i32) (local $y i32)
i64.const 26
call 1
block ;; label = @1
i32.const 0
local.set $x
i32.const 1
local.set $y
local.get $x
local.get $y
local.tee $x
i32.add
local.set $y
i32.const 1
br_if 0 (;@1;)
i64.const 16
call 1
local.get $x
local.get $y
local.tee $x
i32.add
local.set $y
end
local.get $y
)
(func (;1;) (type 1) (param i64)
global.get 0
local.get 0
i64.ge_u
if ;; label = @1
global.get 0
local.get 0
i64.sub
global.set 0
else
i64.const -1
global.set 0
unreachable
end
)
(global (;0;) (mut i64) i64.const 0)
(export "gas_left" (global 0))
)
@@ -1,10 +1,10 @@
(module
(type (;0;) (func (param i32 i32) (result i32)))
(type (;1;) (func (param i32)))
(type (;1;) (func (param i64)))
(import "env" "gas" (func (;0;) (type 1)))
(func $add_locals (;1;) (type 0) (param $x i32) (param $y i32) (result i32)
(local i32)
i32.const 5
i64.const 6
call 0
local.get $x
local.get $y
@@ -13,7 +13,7 @@
local.get 2
)
(func $add (;2;) (type 0) (param i32 i32) (result i32)
i32.const 3
i64.const 3
call 0
local.get 0
local.get 1
@@ -0,0 +1,38 @@
(module
(type (;0;) (func (param i32 i32) (result i32)))
(type (;1;) (func (param i64)))
(func $add_locals (;0;) (type 0) (param $x i32) (param $y i32) (result i32)
(local $t i32)
i64.const 17
call 2
local.get $x
local.get $y
call $add
local.set $t
local.get $t
)
(func $add (;1;) (type 0) (param $x i32) (param $y i32) (result i32)
i64.const 14
call 2
local.get $x
local.get $y
i32.add
)
(func (;2;) (type 1) (param i64)
global.get 0
local.get 0
i64.ge_u
if ;; label = @1
global.get 0
local.get 0
i64.sub
global.set 0
else
i64.const -1
global.set 0
unreachable
end
)
(global (;0;) (mut i64) i64.const 0)
(export "gas_left" (global 0))
)
@@ -1,19 +1,19 @@
(module
(type (;0;) (func (param i32) (result i32)))
(type (;1;) (func (param i32)))
(type (;1;) (func (param i64)))
(import "env" "gas" (func (;0;) (type 1)))
(func (;1;) (type 0) (param i32) (result i32)
i32.const 2
i64.const 2
call 0
i32.const 1
if (result i32) ;; label = @1
i32.const 3
if (result i32) ;; label = @1
i64.const 3
call 0
local.get 0
i32.const 1
i32.add
else
i32.const 2
i64.const 2
call 0
local.get 0
i32.popcnt
+38
View File
@@ -0,0 +1,38 @@
(module
(type (;0;) (func (param i32) (result i32)))
(type (;1;) (func (param i64)))
(func (;0;) (type 0) (param $x i32) (result i32)
i64.const 13
call 1
i32.const 1
if (result i32) ;; label = @1
i64.const 14
call 1
local.get $x
i32.const 1
i32.add
else
i64.const 13
call 1
local.get $x
i32.popcnt
end
)
(func (;1;) (type 1) (param i64)
global.get 0
local.get 0
i64.ge_u
if ;; label = @1
global.get 0
local.get 0
i64.sub
global.set 0
else
i64.const -1
global.set 0
unreachable
end
)
(global (;0;) (mut i64) i64.const 0)
(export "gas_left" (global 0))
)
@@ -1,16 +1,16 @@
(module
(type (;0;) (func))
(type (;1;) (func (param i32)))
(type (;1;) (func (param i64)))
(import "env" "gas" (func (;0;) (type 1)))
(func (;1;) (type 0)
i32.const 2
i64.const 2
call 0
i32.const 1
if ;; label = @1
i32.const 1
if ;; label = @1
i64.const 1
call 0
loop ;; label = @2
i32.const 2
loop ;; label = @2
i64.const 2
call 0
i32.const 123
drop
@@ -18,9 +18,9 @@
end
)
(func (;2;) (type 0)
i32.const 1
i64.const 1
call 0
block ;; label = @1
block ;; label = @1
end
)
(export "simple" (func 1))
@@ -0,0 +1,43 @@
(module
(type (;0;) (func))
(type (;1;) (func (param i64)))
(func (;0;) (type 0)
i64.const 13
call 2
i32.const 1
if ;; label = @1
i64.const 12
call 2
loop ;; label = @2
i64.const 13
call 2
i32.const 123
drop
end
end
)
(func (;1;) (type 0)
i64.const 12
call 2
block ;; label = @1
end
)
(func (;2;) (type 1) (param i64)
global.get 0
local.get 0
i64.ge_u
if ;; label = @1
global.get 0
local.get 0
i64.sub
global.set 0
else
i64.const -1
global.set 0
unreachable
end
)
(global (;0;) (mut i64) i64.const 0)
(export "simple" (func 0))
(export "gas_left" (global 0))
)
@@ -1,12 +1,12 @@
(module
(type (;0;) (func (param i32 i32)))
(type (;1;) (func))
(type (;2;) (func (param i32)))
(type (;2;) (func (param i64)))
(import "env" "ext_return" (func $ext_return (;0;) (type 0)))
(import "env" "memory" (memory (;0;) 1 1))
(import "env" "gas" (func (;1;) (type 2)))
(func $start (;2;) (type 1)
i32.const 4
i64.const 4
call 1
i32.const 8
i32.const 4
@@ -0,0 +1,36 @@
(module
(type (;0;) (func (param i32 i32)))
(type (;1;) (func))
(type (;2;) (func (param i64)))
(import "env" "ext_return" (func $ext_return (;0;) (type 0)))
(import "env" "memory" (memory (;0;) 1 1))
(func $start (;1;) (type 1)
i64.const 15
call 3
i32.const 8
i32.const 4
call $ext_return
unreachable
)
(func (;2;) (type 1))
(func (;3;) (type 2) (param i64)
global.get 0
local.get 0
i64.ge_u
if ;; label = @1
global.get 0
local.get 0
i64.sub
global.set 0
else
i64.const -1
global.set 0
unreachable
end
)
(global (;0;) (mut i64) i64.const 0)
(export "call" (func 2))
(export "gas_left" (global 0))
(start $start)
(data (;0;) (i32.const 8) "\01\02\03\04")
)
@@ -8,7 +8,7 @@
global.get 0
i32.const 1024
i32.gt_u
if ;; label = @1
if ;; label = @1
unreachable
end
call 0
@@ -25,7 +25,7 @@
global.get 0
i32.const 1024
i32.gt_u
if ;; label = @1
if ;; label = @1
unreachable
end
call 0
@@ -42,7 +42,7 @@
global.get 0
i32.const 1024
i32.gt_u
if ;; label = @1
if ;; label = @1
unreachable
end
call 1
+2 -2
View File
@@ -24,7 +24,7 @@
global.get 1
i32.const 1024
i32.gt_u
if ;; label = @1
if ;; label = @1
unreachable
end
call $i32.add
@@ -44,7 +44,7 @@
global.get 1
i32.const 1024
i32.gt_u
if ;; label = @1
if ;; label = @1
unreachable
end
call $i32.add
+1 -1
View File
@@ -20,7 +20,7 @@
global.get 0
i32.const 1024
i32.gt_u
if ;; label = @1
if ;; label = @1
unreachable
end
call 2
@@ -11,7 +11,7 @@
global.get 0
i32.const 1024
i32.gt_u
if ;; label = @1
if ;; label = @1
unreachable
end
call $one-group-many-locals
+1 -1
View File
@@ -12,7 +12,7 @@
global.get 0
i32.const 1024
i32.gt_u
if ;; label = @1
if ;; label = @1
unreachable
end
call 0
+2 -2
View File
@@ -15,7 +15,7 @@
global.get 0
i32.const 1024
i32.gt_u
if ;; label = @1
if ;; label = @1
unreachable
end
call $start
@@ -32,7 +32,7 @@
global.get 0
i32.const 1024
i32.gt_u
if ;; label = @1
if ;; label = @1
unreachable
end
call 2
+3 -3
View File
@@ -13,7 +13,7 @@
global.get 0
i32.const 1024
i32.gt_u
if ;; label = @1
if ;; label = @1
unreachable
end
call $i32.add
@@ -37,7 +37,7 @@
global.get 0
i32.const 1024
i32.gt_u
if ;; label = @1
if ;; label = @1
unreachable
end
call 1
@@ -56,7 +56,7 @@
global.get 0
i32.const 1024
i32.gt_u
if ;; label = @1
if ;; label = @1
unreachable
end
call $i32.add
+11 -11
View File
@@ -3,25 +3,25 @@
(local $x i32) (local $y i32)
(block $unrolled_loop
(set_local $x (i32.const 0))
(set_local $y (i32.const 1))
(local.set $x (i32.const 0))
(local.set $y (i32.const 1))
get_local $x
get_local $y
tee_local $x
local.get $x
local.get $y
local.tee $x
i32.add
set_local $y
local.set $y
i32.const 1
br_if $unrolled_loop
get_local $x
get_local $y
tee_local $x
local.get $x
local.get $y
local.tee $x
i32.add
set_local $y
local.set $y
)
get_local $y
local.get $y
)
)
+6 -6
View File
@@ -2,18 +2,18 @@
(func $add_locals (param $x i32) (param $y i32) (result i32)
(local $t i32)
get_local $x
get_local $y
local.get $x
local.get $y
call $add
set_local $t
local.set $t
get_local $t
local.get $t
)
(func $add (param $x i32) (param $y i32) (result i32)
(i32.add
(get_local $x)
(get_local $y)
(local.get $x)
(local.get $y)
)
)
)
+2 -2
View File
@@ -2,8 +2,8 @@
(func (param $x i32) (result i32)
(if (result i32)
(i32.const 1)
(then (i32.add (get_local $x) (i32.const 1)))
(else (i32.popcnt (get_local $x)))
(then (i32.add (local.get $x) (i32.const 1)))
(else (i32.popcnt (local.get $x)))
)
)
)
+13 -13
View File
@@ -5,22 +5,22 @@
(global $counter (mut i32) (i32.const 1))
(func $i32.add (export "i32.add") (param i32 i32) (result i32)
get_local 0
get_local 1
i32.add
local.get 0
local.get 1
i32.add
)
(func (param $arg i32)
(local $tmp i32)
(local $tmp i32)
global.get 0
i32.const 1
i32.add
tee_local $tmp
global.set $counter
global.get 0
i32.const 1
i32.add
local.tee $tmp
global.set $counter
get_local $tmp
get_local $arg
call $i32.add
drop
local.get $tmp
local.get $arg
call $i32.add
drop
)
)
+2 -2
View File
@@ -8,8 +8,8 @@
call $foo
call $boo
get_local 0
get_local 1
local.get 0
local.get 1
i32.add
)
)
+1 -1
View File
@@ -6,5 +6,5 @@
(call
$one-group-many-locals
)
)
)
)
+5 -5
View File
@@ -1,17 +1,17 @@
(module
(import "env" "foo" (func $foo))
(func (param i32)
get_local 0
local.get 0
i32.const 0
call $i32.add
drop
)
(func $i32.add (export "i32.add") (param i32 i32) (result i32)
get_local 0
get_local 1
i32.add
local.get 0
local.get 1
i32.add
)
(table 10 anyfunc)
(table 10 funcref)
;; Refer all types of functions: imported, defined not exported and defined exported.
(elem (i32.const 0) 0 1 2)
+146 -48
View File
@@ -1,9 +1,10 @@
use std::{
fs::{read, read_dir},
fs::{read, read_dir, ReadDir},
path::PathBuf,
};
use wasm_instrument::{
gas_metering, inject_stack_limiter,
gas_metering::{self, host_function, mutable_global, ConstantCostRules},
inject_stack_limiter,
parity_wasm::{deserialize_buffer, elements::Module, serialize},
};
@@ -14,60 +15,157 @@ fn fixture_dir() -> PathBuf {
path
}
/// Print the overhead of applying gas metering, stack height limiting or both.
///
/// Use `cargo test print_overhead -- --nocapture`.
#[test]
fn print_size_overhead() {
let mut results: Vec<_> = read_dir(fixture_dir())
.unwrap()
use gas_metering::Backend;
fn gas_metered_mod_len<B: Backend>(orig_module: Module, backend: B) -> (Module, usize) {
let module = gas_metering::inject(orig_module, backend, &ConstantCostRules::default()).unwrap();
let bytes = serialize(module.clone()).unwrap();
let len = bytes.len();
(module, len)
}
fn stack_limited_mod_len(module: Module) -> (Module, usize) {
let module = inject_stack_limiter(module, 128).unwrap();
let bytes = serialize(module.clone()).unwrap();
let len = bytes.len();
(module, len)
}
struct InstrumentedWasmResults {
filename: String,
original_module_len: usize,
stack_limited_len: usize,
gas_metered_host_fn_len: usize,
gas_metered_mut_glob_len: usize,
gas_metered_host_fn_then_stack_limited_len: usize,
gas_metered_mut_glob_then_stack_limited_len: usize,
}
fn size_overheads_all(files: ReadDir) -> Vec<InstrumentedWasmResults> {
files
.map(|entry| {
let entry = entry.unwrap();
let (orig_len, orig_module) = {
let bytes = read(&entry.path()).unwrap();
let filename = entry.file_name().into_string().unwrap();
let (original_module_len, orig_module) = {
let bytes = match entry.path().extension().unwrap().to_str() {
Some("wasm") => read(entry.path()).unwrap(),
Some("wat") =>
wat::parse_bytes(&read(entry.path()).unwrap()).unwrap().into_owned(),
_ => panic!("expected fixture_dir containing .wasm or .wat files only"),
};
let len = bytes.len();
let module: Module = deserialize_buffer(&bytes).unwrap();
(len, module)
};
let (gas_metering_len, gas_module) = {
let module = gas_metering::inject(
orig_module.clone(),
&gas_metering::ConstantCostRules::default(),
"env",
)
.unwrap();
let bytes = serialize(module.clone()).unwrap();
let len = bytes.len();
(len, module)
};
let stack_height_len = {
let module = inject_stack_limiter(orig_module, 128).unwrap();
let bytes = serialize(module).unwrap();
bytes.len()
};
let both_len = {
let module = inject_stack_limiter(gas_module, 128).unwrap();
let bytes = serialize(module).unwrap();
bytes.len()
};
let overhead = both_len * 100 / orig_len;
let (gm_host_fn_module, gas_metered_host_fn_len) = gas_metered_mod_len(
orig_module.clone(),
host_function::Injector::new("env", "gas"),
);
(
overhead,
format!(
"{:30}: orig = {:4} kb, gas_metering = {} %, stack_limiter = {} %, both = {} %",
entry.file_name().to_str().unwrap(),
orig_len / 1024,
gas_metering_len * 100 / orig_len,
stack_height_len * 100 / orig_len,
overhead,
),
)
let (gm_mut_global_module, gas_metered_mut_glob_len) =
gas_metered_mod_len(orig_module.clone(), mutable_global::Injector::new("gas_left"));
let stack_limited_len = stack_limited_mod_len(orig_module).1;
let (_gm_hf_sl_mod, gas_metered_host_fn_then_stack_limited_len) =
stack_limited_mod_len(gm_host_fn_module);
let (_gm_mg_sl_module, gas_metered_mut_glob_then_stack_limited_len) =
stack_limited_mod_len(gm_mut_global_module);
InstrumentedWasmResults {
filename,
original_module_len,
stack_limited_len,
gas_metered_host_fn_len,
gas_metered_mut_glob_len,
gas_metered_host_fn_then_stack_limited_len,
gas_metered_mut_glob_then_stack_limited_len,
}
})
.collect();
results.sort_unstable_by(|a, b| b.0.cmp(&a.0));
for entry in results {
println!("{}", entry.1);
.collect()
}
fn calc_size_overheads() -> Vec<InstrumentedWasmResults> {
let mut wasm_path = fixture_dir();
wasm_path.push("wasm");
let mut wat_path = fixture_dir();
wat_path.push("wat");
let mut results = size_overheads_all(read_dir(wasm_path).unwrap());
let results_wat = size_overheads_all(read_dir(wat_path).unwrap());
results.extend(results_wat);
results
}
/// Print the overhead of applying gas metering, stack
/// height limiting or both.
///
/// Use `cargo test print_size_overhead -- --nocapture`.
#[test]
fn print_size_overhead() {
let mut results = calc_size_overheads();
results.sort_unstable_by(|a, b| {
b.gas_metered_mut_glob_then_stack_limited_len
.cmp(&a.gas_metered_mut_glob_then_stack_limited_len)
});
for r in results {
let filename = r.filename;
let original_size = r.original_module_len / 1024;
let stack_limit = r.stack_limited_len * 100 / r.original_module_len;
let host_fn = r.gas_metered_host_fn_len * 100 / r.original_module_len;
let mut_glob = r.gas_metered_mut_glob_len * 100 / r.original_module_len;
let host_fn_sl = r.gas_metered_host_fn_then_stack_limited_len * 100 / r.original_module_len;
let mut_glob_sl =
r.gas_metered_mut_glob_then_stack_limited_len * 100 / r.original_module_len;
println!(
"{filename:30}: orig = {original_size:4} kb, stack_limiter = {stack_limit} %, \
gas_metered_host_fn = {host_fn} %, both = {host_fn_sl} %,\n \
{:69} gas_metered_mut_global = {mut_glob} %, both = {mut_glob_sl} %",
""
);
}
}
/// Compare module size overhead of applying gas metering with two methods.
///
/// Use `cargo test print_gas_metered_sizes -- --nocapture`.
#[test]
fn print_gas_metered_sizes() {
let overheads = calc_size_overheads();
let mut results = overheads
.iter()
.map(|r| {
let diff = (r.gas_metered_mut_glob_len * 100 / r.gas_metered_host_fn_len) as i32 - 100;
(diff, r)
})
.collect::<Vec<(i32, &InstrumentedWasmResults)>>();
results.sort_unstable_by(|a, b| b.0.cmp(&a.0));
println!(
"| {:28} | {:^16} | gas metered/host fn | gas metered/mut global | size diff |",
"fixture", "original size",
);
println!("|{:-^30}|{:-^18}|{:-^21}|{:-^24}|{:-^11}|", "", "", "", "", "",);
for r in results {
let filename = &r.1.filename;
let original_size = &r.1.original_module_len / 1024;
let host_fn = &r.1.gas_metered_host_fn_len / 1024;
let mut_glob = &r.1.gas_metered_mut_glob_len / 1024;
let host_fn_percent = &r.1.gas_metered_host_fn_len * 100 / r.1.original_module_len;
let mut_glob_percent = &r.1.gas_metered_mut_glob_len * 100 / r.1.original_module_len;
let host_fn = format!("{host_fn} kb ({host_fn_percent:}%)");
let mut_glob = format!("{mut_glob} kb ({mut_glob_percent:}%)");
let diff = &r.0;
println!(
"| {filename:28} | {original_size:13} kb | {host_fn:>19} | {mut_glob:>22} | {diff:+8}% |"
);
}
}