Commit Graph

663 Commits

Author SHA1 Message Date
zach
1f46f9842d v1.10.0 v1.10.0 2025-02-10 10:44:48 -08:00
zach
b249f09b90 fix(ci): remove path parameter from download-artifact action in release workflow (#831) 2025-02-10 10:28:23 -08:00
zach
4e638e14b1 chore: update wasmtime bounds to include more versions (#828)
Upgrades from wasmtime 26 to wasmtime 27-29, allowing us to support more
versions (including the possibility of supporting future releases
without changes)
2025-02-06 17:03:58 -08:00
zach
d7956ff08c fix(ci): use new download-artifact api (#827) 2025-02-04 13:49:19 -08:00
dependabot[bot]
87c3384f1e chore(deps): Update ureq requirement from 2.5 to 3.0 (#825)
Closes #824 

Updates the requirements on [ureq](https://github.com/algesten/ureq) to
permit the latest version.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/algesten/ureq/blob/main/CHANGELOG.md">ureq's
changelog</a>.</em></p>
<blockquote>
<h1>3.0.3</h1>
<ul>
<li>Use the same data in CONNECT and Host header for proxied requests
(<a
href="https://redirect.github.com/algesten/ureq/issues/967">#967</a>)</li>
<li>Set default scheme in proxy uri (<a
href="https://redirect.github.com/algesten/ureq/issues/966">#966</a>)</li>
<li>Redact URI and Location header on debug level (<a
href="https://redirect.github.com/algesten/ureq/issues/964">#964</a>)</li>
<li>Downgrade all logging to debug and below (<a
href="https://redirect.github.com/algesten/ureq/issues/964">#964</a>)</li>
</ul>
<h1>3.0.2</h1>
<ul>
<li>Remove dependency on once_cell (<a
href="https://redirect.github.com/algesten/ureq/issues/959">#959</a>)</li>
<li>Fix bug parsing partial redirects (<a
href="https://redirect.github.com/algesten/ureq/issues/958">#958</a>)</li>
<li>Expose typestate variables (<a
href="https://redirect.github.com/algesten/ureq/issues/956">#956</a>)</li>
</ul>
<h1>3.0.1</h1>
<ul>
<li>Fix excessive stack sizes (<a
href="https://redirect.github.com/algesten/ureq/issues/950">#950</a>)</li>
<li>Do not enable <strong>json</strong> by default (breaking, but it was
a mistake) (<a
href="https://redirect.github.com/algesten/ureq/issues/948">#948</a>)</li>
</ul>
<h1>3.0.0</h1>
<ul>
<li>Replace RequestBuilder Deref with explicit wrappers (<a
href="https://redirect.github.com/algesten/ureq/issues/944">#944</a>)</li>
<li>Remove dependency on <code>url</code> crate (<a
href="https://redirect.github.com/algesten/ureq/issues/943">#943</a>)</li>
<li>Feature <code>Config::save_redirect_history</code> (<a
href="https://redirect.github.com/algesten/ureq/issues/939">#939</a>)</li>
</ul>
<h1>3.0.0-rc5</h1>
<ul>
<li><code>TlsConfig::unversioned_rustls_crypto_provider()</code> (<a
href="https://redirect.github.com/algesten/ureq/issues/931">#931</a>)</li>
<li>Feature <code>rustls-no-provider</code> to compile without ring (<a
href="https://redirect.github.com/algesten/ureq/issues/931">#931</a>)</li>
<li>Fix CONNECT proxy Host header (<a
href="https://redirect.github.com/algesten/ureq/issues/936">#936</a>)</li>
<li>Re-enable CONNECT proxy support (<a
href="https://redirect.github.com/algesten/ureq/issues/932">#932</a>)</li>
<li>Body::content_length (<a
href="https://redirect.github.com/algesten/ureq/issues/927">#927</a>)</li>
<li>Handle Authorization: Basic from URI (<a
href="https://redirect.github.com/algesten/ureq/issues/923">#923</a>)</li>
<li>Remove many uses of Box::new() from Connector chain (<a
href="https://redirect.github.com/algesten/ureq/issues/919">#919</a>)</li>
</ul>
<h1>3.0.0-rc4</h1>
<ul>
<li>Default to <code>TooManyRedirects</code> error (<a
href="https://redirect.github.com/algesten/ureq/issues/916">#916</a>)</li>
<li>Add <code>ConfigBuilder::max_redirects_will_error()</code> (<a
href="https://redirect.github.com/algesten/ureq/issues/916">#916</a>)</li>
<li>Add new <code>SendBody::into_reader()</code> (<a
href="https://redirect.github.com/algesten/ureq/issues/914">#914</a>)</li>
<li>Fix completely broken PEM parsing (<a
href="https://redirect.github.com/algesten/ureq/issues/912">#912</a>)</li>
<li>Improve ergonomics for <code>AutoHeaderValue</code> (<a
href="https://redirect.github.com/algesten/ureq/issues/896">#896</a>)</li>
</ul>
<h1>3.0.0-rc3</h1>
<ul>
<li>Re-export ureq_proto::ArrayVec (<a
href="https://redirect.github.com/algesten/ureq/issues/891">#891</a>)</li>
<li>Expose typestate variables, but #[doc(hidden)] (<a
href="https://redirect.github.com/algesten/ureq/issues/889">#889</a>)</li>
<li>Clarify versioning and MSRV policy (<a
href="https://redirect.github.com/algesten/ureq/issues/887">#887</a>)</li>
<li>Get last used uri via <code>ResponseExt::get_uri()</code> (<a
href="https://redirect.github.com/algesten/ureq/issues/884">#884</a>)</li>
<li>Expose more things for 3rd party Transport impls (<a
href="https://redirect.github.com/algesten/ureq/issues/886">#886</a>)</li>
<li>Make accessor fn for <code>Config</code> and <code>TlsConfig</code>
(<a
href="https://redirect.github.com/algesten/ureq/issues/886">#886</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="5cb17e8e1f"><code>5cb17e8</code></a>
Update doc</li>
<li><a
href="81127cfc38"><code>81127cf</code></a>
3.0.3</li>
<li><a
href="89d593c31c"><code>89d593c</code></a>
proxy: use the same data for CONNECT and Host header</li>
<li><a
href="e2e27ea654"><code>e2e27ea</code></a>
Set default proxy scheme in proxy uri</li>
<li><a
href="7533c1ad45"><code>7533c1a</code></a>
Update changelog</li>
<li><a
href="0d274df41b"><code>0d274df</code></a>
Use more constants for headers</li>
<li><a
href="0a4f6d7d75"><code>0a4f6d7</code></a>
Redact Location header</li>
<li><a
href="50347206a1"><code>5034720</code></a>
Downgrade info! level to debug!</li>
<li><a
href="4173dd49d7"><code>4173dd4</code></a>
ureq-proto 0.3.0</li>
<li><a
href="3d5f182fa3"><code>3d5f182</code></a>
3.0.2</li>
<li>Additional commits viewable in <a
href="https://github.com/algesten/ureq/compare/2.5.0...3.0.3">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: zach <zach@dylibso.com>
2025-02-04 11:30:53 -08:00
dependabot[bot]
07047eaab0 chore(deps): Update rand requirement from 0.8.5 to 0.9.0 (#826)
Updates the requirements on [rand](https://github.com/rust-random/rand)
to permit the latest version.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-random/rand/blob/master/CHANGELOG.md">rand's
changelog</a>.</em></p>
<blockquote>
<h2>[0.9.0] - 2025-01-27</h2>
<h3>Security and unsafe</h3>
<ul>
<li>Policy: &quot;rand is not a crypto library&quot; (<a
href="https://redirect.github.com/rust-random/rand/issues/1514">#1514</a>)</li>
<li>Remove fork-protection from <code>ReseedingRng</code> and
<code>ThreadRng</code>. Instead, it is recommended to call
<code>ThreadRng::reseed</code> on fork. (<a
href="https://redirect.github.com/rust-random/rand/issues/1379">#1379</a>)</li>
<li>Use <code>zerocopy</code> to replace some <code>unsafe</code> code
(<a
href="https://redirect.github.com/rust-random/rand/issues/1349">#1349</a>,
<a
href="https://redirect.github.com/rust-random/rand/issues/1393">#1393</a>,
<a
href="https://redirect.github.com/rust-random/rand/issues/1446">#1446</a>,
<a
href="https://redirect.github.com/rust-random/rand/issues/1502">#1502</a>)</li>
</ul>
<h3>Dependencies</h3>
<ul>
<li>Bump the MSRV to 1.63.0 (<a
href="https://redirect.github.com/rust-random/rand/issues/1207">#1207</a>,
<a
href="https://redirect.github.com/rust-random/rand/issues/1246">#1246</a>,
<a
href="https://redirect.github.com/rust-random/rand/issues/1269">#1269</a>,
<a
href="https://redirect.github.com/rust-random/rand/issues/1341">#1341</a>,
<a
href="https://redirect.github.com/rust-random/rand/issues/1416">#1416</a>,
<a
href="https://redirect.github.com/rust-random/rand/issues/1536">#1536</a>);
note that 1.60.0 may work for dependents when using
<code>--ignore-rust-version</code></li>
<li>Update to <code>rand_core</code> v0.9.0 (<a
href="https://redirect.github.com/rust-random/rand/issues/1558">#1558</a>)</li>
</ul>
<h3>Features</h3>
<ul>
<li>Support <code>std</code> feature without <code>getrandom</code> or
<code>rand_chacha</code> (<a
href="https://redirect.github.com/rust-random/rand/issues/1354">#1354</a>)</li>
<li>Enable feature <code>small_rng</code> by default (<a
href="https://redirect.github.com/rust-random/rand/issues/1455">#1455</a>)</li>
<li>Remove implicit feature <code>rand_chacha</code>; use
<code>std_rng</code> instead. (<a
href="https://redirect.github.com/rust-random/rand/issues/1473">#1473</a>)</li>
<li>Rename feature <code>serde1</code> to <code>serde</code> (<a
href="https://redirect.github.com/rust-random/rand/issues/1477">#1477</a>)</li>
<li>Rename feature <code>getrandom</code> to <code>os_rng</code> (<a
href="https://redirect.github.com/rust-random/rand/issues/1537">#1537</a>)</li>
<li>Add feature <code>thread_rng</code> (<a
href="https://redirect.github.com/rust-random/rand/issues/1547">#1547</a>)</li>
</ul>
<h3>API changes: rand_core traits</h3>
<ul>
<li>Add fn <code>RngCore::read_adapter</code> implementing
<code>std::io::Read</code> (<a
href="https://redirect.github.com/rust-random/rand/issues/1267">#1267</a>)</li>
<li>Add trait <code>CryptoBlockRng: BlockRngCore</code>; make
<code>trait CryptoRng: RngCore</code> (<a
href="https://redirect.github.com/rust-random/rand/issues/1273">#1273</a>)</li>
<li>Add traits <code>TryRngCore</code>, <code>TryCryptoRng</code> (<a
href="https://redirect.github.com/rust-random/rand/issues/1424">#1424</a>,
<a
href="https://redirect.github.com/rust-random/rand/issues/1499">#1499</a>)</li>
<li>Rename <code>fn SeedableRng::from_rng</code> -&gt;
<code>try_from_rng</code> and add infallible variant <code>fn
from_rng</code> (<a
href="https://redirect.github.com/rust-random/rand/issues/1424">#1424</a>)</li>
<li>Rename <code>fn SeedableRng::from_entropy</code> -&gt;
<code>from_os_rng</code> and add fallible variant <code>fn
try_from_os_rng</code> (<a
href="https://redirect.github.com/rust-random/rand/issues/1424">#1424</a>)</li>
<li>Add bounds <code>Clone</code> and <code>AsRef</code> to associated
type <code>SeedableRng::Seed</code> (<a
href="https://redirect.github.com/rust-random/rand/issues/1491">#1491</a>)</li>
</ul>
<h3>API changes: Rng trait and top-level fns</h3>
<ul>
<li>Rename fn <code>rand::thread_rng()</code> to
<code>rand::rng()</code> and remove from the prelude (<a
href="https://redirect.github.com/rust-random/rand/issues/1506">#1506</a>)</li>
<li>Remove fn <code>rand::random()</code> from the prelude (<a
href="https://redirect.github.com/rust-random/rand/issues/1506">#1506</a>)</li>
<li>Add top-level fns <code>random_iter</code>,
<code>random_range</code>, <code>random_bool</code>,
<code>random_ratio</code>, <code>fill</code> (<a
href="https://redirect.github.com/rust-random/rand/issues/1488">#1488</a>)</li>
<li>Re-introduce fn <code>Rng::gen_iter</code> as
<code>random_iter</code> (<a
href="https://redirect.github.com/rust-random/rand/issues/1305">#1305</a>,
<a
href="https://redirect.github.com/rust-random/rand/issues/1500">#1500</a>)</li>
<li>Rename fn <code>Rng::gen</code> to <code>random</code> to avoid
conflict with the new <code>gen</code> keyword in Rust 2024 (<a
href="https://redirect.github.com/rust-random/rand/issues/1438">#1438</a>)</li>
<li>Rename fns <code>Rng::gen_range</code> to <code>random_range</code>,
<code>gen_bool</code> to <code>random_bool</code>,
<code>gen_ratio</code> to <code>random_ratio</code> (<a
href="https://redirect.github.com/rust-random/rand/issues/1505">#1505</a>)</li>
<li>Annotate panicking methods with <code>#[track_caller]</code> (<a
href="https://redirect.github.com/rust-random/rand/issues/1442">#1442</a>,
<a
href="https://redirect.github.com/rust-random/rand/issues/1447">#1447</a>)</li>
</ul>
<h3>API changes: RNGs</h3>
<ul>
<li>Fix <code>&lt;SmallRng as SeedableRng&gt;::Seed</code> size to 256
bits (<a
href="https://redirect.github.com/rust-random/rand/issues/1455">#1455</a>)</li>
<li>Remove first parameter (<code>rng</code>) of
<code>ReseedingRng::new</code> (<a
href="https://redirect.github.com/rust-random/rand/issues/1533">#1533</a>)</li>
</ul>
<h3>API changes: Sequences</h3>
<ul>
<li>Split trait <code>SliceRandom</code> into
<code>IndexedRandom</code>, <code>IndexedMutRandom</code>,
<code>SliceRandom</code> (<a
href="https://redirect.github.com/rust-random/rand/issues/1382">#1382</a>)</li>
<li>Add <code>IndexedRandom::choose_multiple_array</code>,
<code>index::sample_array</code> (<a
href="https://redirect.github.com/rust-random/rand/issues/1453">#1453</a>,
<a
href="https://redirect.github.com/rust-random/rand/issues/1469">#1469</a>)</li>
</ul>
<h3>API changes: Distributions: renames</h3>
<ul>
<li>Rename module <code>rand::distributions</code> to
<code>rand::distr</code> (<a
href="https://redirect.github.com/rust-random/rand/issues/1470">#1470</a>)</li>
<li>Rename distribution <code>Standard</code> to
<code>StandardUniform</code> (<a
href="https://redirect.github.com/rust-random/rand/issues/1526">#1526</a>)</li>
<li>Move <code>distr::Slice</code> -&gt;
<code>distr::slice::Choose</code>, <code>distr::EmptySlice</code> -&gt;
<code>distr::slice::Empty</code> (<a
href="https://redirect.github.com/rust-random/rand/issues/1548">#1548</a>)</li>
<li>Rename trait <code>distr::DistString</code> -&gt;
<code>distr::SampleString</code> (<a
href="https://redirect.github.com/rust-random/rand/issues/1548">#1548</a>)</li>
<li>Rename <code>distr::DistIter</code> -&gt; <code>distr::Iter</code>,
<code>distr::DistMap</code> -&gt; <code>distr::Map</code> (<a
href="https://redirect.github.com/rust-random/rand/issues/1548">#1548</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="96f8df65ee"><code>96f8df6</code></a>
Prepare 0.9.0 release (<a
href="https://redirect.github.com/rust-random/rand/issues/1558">#1558</a>)</li>
<li><a
href="34da3214df"><code>34da321</code></a>
Enable <code>stdarch_x86_avx512</code> for cpu has <code>avx512bw</code>
(<a
href="https://redirect.github.com/rust-random/rand/issues/1551">#1551</a>)</li>
<li><a
href="b4b1eb7579"><code>b4b1eb7</code></a>
Re-org with distr::slice, distr::weighted modules (<a
href="https://redirect.github.com/rust-random/rand/issues/1548">#1548</a>)</li>
<li><a
href="16eb7de94a"><code>16eb7de</code></a>
Add the <code>thread_rng</code> feature flag (<a
href="https://redirect.github.com/rust-random/rand/issues/1547">#1547</a>)</li>
<li><a
href="afa24e49b4"><code>afa24e4</code></a>
Fix test status badges (<a
href="https://redirect.github.com/rust-random/rand/issues/1544">#1544</a>)</li>
<li><a
href="c681dfc345"><code>c681dfc</code></a>
Create FUNDING.yml</li>
<li><a
href="9f05e22afb"><code>9f05e22</code></a>
Update: getrandom v0.3.0 rc.0 (<a
href="https://redirect.github.com/rust-random/rand/issues/1541">#1541</a>)</li>
<li><a
href="88c310b189"><code>88c310b</code></a>
Fix docs.rs build options (<a
href="https://redirect.github.com/rust-random/rand/issues/1539">#1539</a>)</li>
<li><a
href="b879689a60"><code>b879689</code></a>
Adjust GH Actions (<a
href="https://redirect.github.com/rust-random/rand/issues/1538">#1538</a>)</li>
<li><a
href="3fac49fe89"><code>3fac49f</code></a>
Prepare 0.9.0-beta.0 (<a
href="https://redirect.github.com/rust-random/rand/issues/1535">#1535</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/rust-random/rand/compare/0.8.5...0.9.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: zach <zach@dylibso.com>
2025-02-04 10:21:53 -08:00
zach
1e281e93cd cleanup: remove android release (#823)
Also switches to actions-rust-lang/setup-rust-toolchain@v1 since
actions-rs/toolchain is deprecated
2025-01-28 15:53:13 -08:00
zach
f57d987d48 ci: fix android release, attempt #2 (#818) 2025-01-21 12:08:18 -08:00
zach
9da6d43f05 ci: install android libunwind before build step (#817)
Fixes #816
2025-01-21 11:41:10 -08:00
zach
d1a248e19e cleanup: stop timer from using 100% cpu when no timeouts are set (#814)
Fixes an issue reported on discord
(https://discord.com/channels/1011124058408112148/1154513155209298041/1329622656235864156)
where the timer thread is taking up an entire CPU
2025-01-20 14:01:37 -08:00
dependabot[bot]
7b2db7588b chore(deps): Update cbindgen requirement from 0.27 to 0.28 (#815)
Updates the requirements on
[cbindgen](https://github.com/mozilla/cbindgen) to permit the latest
version.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/mozilla/cbindgen/releases">cbindgen's
releases</a>.</em></p>
<blockquote>
<h1>0.28.0</h1>
<ul>
<li>Parse unsafe attributes in <a
href="https://redirect.github.com/mozilla/cbindgen/pull/1020">mozilla/cbindgen#1020</a></li>
<li>Fix local override of enum prefix-with-name by jsgf in <a
href="https://redirect.github.com/mozilla/cbindgen/pull/1006">mozilla/cbindgen#1006</a></li>
<li>Add rename-all=prefix in <a
href="https://redirect.github.com/mozilla/cbindgen/pull/1021">mozilla/cbindgen#1021</a></li>
<li>ir: add support for UnsafeCell and SyncUnsafeCell by alekitto in <a
href="https://redirect.github.com/mozilla/cbindgen/pull/1003">mozilla/cbindgen#1003</a></li>
<li>Implement mangling for arrays in <a
href="https://redirect.github.com/mozilla/cbindgen/pull/1022">mozilla/cbindgen#1022</a></li>
<li>Fix: Ignore <code>CARGO_BUILD_TARGET</code> in tests by bryango in
<a
href="https://redirect.github.com/mozilla/cbindgen/pull/1010">mozilla/cbindgen#1010</a></li>
<li>Newline for each field for constexpr field constants by youknowone
in <a
href="https://redirect.github.com/mozilla/cbindgen/pull/988">mozilla/cbindgen#988</a></li>
<li>Fix clippy warnings by youknowone in <a
href="https://redirect.github.com/mozilla/cbindgen/pull/1026">mozilla/cbindgen#1026</a></li>
<li>Add aarch64/arm64 to CI by NickeZ in <a
href="https://redirect.github.com/mozilla/cbindgen/pull/1036">mozilla/cbindgen#1036</a></li>
<li>Add <code>unstable_ir</code> feature flag that makes the ir pub by
heesooy in <a
href="https://redirect.github.com/mozilla/cbindgen/pull/1011">mozilla/cbindgen#1011</a></li>
<li>Support generated a symbols file by TheElectronWill in <a
href="https://redirect.github.com/mozilla/cbindgen/pull/916">mozilla/cbindgen#916</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/mozilla/cbindgen/blob/master/CHANGES">cbindgen's
changelog</a>.</em></p>
<blockquote>
<h1>0.28.0</h1>
<pre><code> * Parse unsafe attributes in
https://github.com/mozilla/cbindgen/pull/1020
* Fix local override of enum prefix-with-name by jsgf in
https://github.com/mozilla/cbindgen/pull/1006
* Add rename-all=prefix in https://github.com/mozilla/cbindgen/pull/1021
* ir: add support for UnsafeCell and SyncUnsafeCell by alekitto in
https://github.com/mozilla/cbindgen/pull/1003
* Implement mangling for arrays in
https://github.com/mozilla/cbindgen/pull/1022
* Fix: Ignore `CARGO_BUILD_TARGET` in tests by bryango in
https://github.com/mozilla/cbindgen/pull/1010
* Newline for each field for constexpr field constants by youknowone in
https://github.com/mozilla/cbindgen/pull/988
* Fix clippy warnings by youknowone in
https://github.com/mozilla/cbindgen/pull/1026
* Add aarch64/arm64 to CI by NickeZ in
https://github.com/mozilla/cbindgen/pull/1036
* Add `unstable_ir` feature flag that makes the ir pub by heesooy in
https://github.com/mozilla/cbindgen/pull/1011
* Support generated a symbols file by TheElectronWill in
https://github.com/mozilla/cbindgen/pull/916
</code></pre>
<h1>0.27.0</h1>
<pre><code>  * Revert: The `Config` struct now has a private member.
* Allow users to specify a crate version for bindings generation
([#901](https://github.com/mozilla/cbindgen/issues/901)).
* Update MSRV to 1.74
([#912](https://github.com/mozilla/cbindgen/issues/912),
[#987](https://github.com/mozilla/cbindgen/issues/987)).
* Support #[deprecated] on enum variants
([#933](https://github.com/mozilla/cbindgen/issues/933)).
* Support integrating the package_version information in a header file
comment ([#939](https://github.com/mozilla/cbindgen/issues/939)).
* Add a language backend
([#942](https://github.com/mozilla/cbindgen/issues/942)).
* Support generics with defaulted args
([#959](https://github.com/mozilla/cbindgen/issues/959)).
* Add `VaList` compatibility
([#970](https://github.com/mozilla/cbindgen/issues/970)).
</code></pre>
<h1>0.26.0</h1>
<pre><code>  * Fix swapping of `&gt;&gt;=` and `&lt;&lt;=` in constants.
* Add support for #[deprecated]
([#860](https://github.com/mozilla/cbindgen/issues/860)).
  * Built-in support for bitflags 2.0.
  * Support for &quot;C-unwind&quot; ABI.
* Generate bindings for non-public extern items if they are
#[no_mangle].
</code></pre>
<h2>0.25.0</h2>
<pre><code>  * Re-release of yanked 0.24.6 as a major release
  * Update MSRV to 1.57
* Support variadic arguments (`...`)
([#805](https://github.com/mozilla/cbindgen/issues/805))
* Add --depfile option
([#820](https://github.com/mozilla/cbindgen/issues/820))
  * Breaking changes: The `Config` struct now has a private member.
</code></pre>
<h2>0.24.6 (YANKED: depfile option was breaking, see <a
href="https://redirect.github.com/mozilla/cbindgen/issues/841">#841</a>)</h2>
<pre><code>  * Update MSRV to 1.57
* Support variadic arguments (`...`)
([#805](https://github.com/mozilla/cbindgen/issues/805))
* Add --depfile option
([#820](https://github.com/mozilla/cbindgen/issues/820))
</code></pre>
<h2>0.24.5</h2>
<pre><code>  * Don't enforce tempfile version.
</code></pre>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="bd78bbe59b"><code>bd78bbe</code></a>
Release 0.28.0</li>
<li><a
href="8ca9c4c20f"><code>8ca9c4c</code></a>
tests: Fix symbol file and tests.</li>
<li><a
href="152f91dee0"><code>152f91d</code></a>
Appease clippy.</li>
<li><a
href="70b9d7a980"><code>70b9d7a</code></a>
tests: Run rustfmt.</li>
<li><a
href="87afbf9e01"><code>87afbf9</code></a>
Add a way to generate a list of symbols for dynamic linkage, resolves <a
href="https://redirect.github.com/mozilla/cbindgen/issues/907">#907</a></li>
<li><a
href="80c50c643a"><code>80c50c6</code></a>
Add <code>unstable_ir</code> feature flag that makes the ir pub</li>
<li><a
href="e82815e99a"><code>e82815e</code></a>
Refactor arm64 build to matrix strategy</li>
<li><a
href="a5e1443a45"><code>a5e1443</code></a>
Add aarch64/arm64 to CI</li>
<li><a
href="b9b8f8878a"><code>b9b8f88</code></a>
Fix clippy warnings</li>
<li><a
href="89a9faa97c"><code>89a9faa</code></a>
newlines for constexpr</li>
<li>Additional commits viewable in <a
href="https://github.com/mozilla/cbindgen/compare/v0.27.0...0.28.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>
2025-01-20 14:01:02 -08:00
Benjamin Eckel
a367bc77a3 Add Android targets (#812)
Closes #811

Keep in mind that these targets seem to be tier 3 support and not quite
stable, but i think it's fine to open for experimenting:
https://docs.wasmtime.dev/stability-tiers.html
2025-01-14 10:23:59 -08:00
pwnintended
98800fe8a0 feat: added a function to track fuel consumption (#807)
This PR adds a function to get the fuel consumed by a plugin. This is
useful for systems that want to fairly balance compute. It's my first
time doing anything in rust so let me know if something needs
improvements!

---------

Co-authored-by: zach <zach@dylibso.com>
2024-12-16 16:04:05 -08:00
zach
7e3665ae8c fix: improve sdk error messages around imports (#806)
Closes https://github.com/extism/extism/issues/801


Updates the error from:

```
Unable to compile Extism plugin: incompatible import type for `extism:host/user::wrong_type`
```

to:

```
Unable to compile Extism plugin: types incompatible: expected type `(func (result i32))`, found type `(func (result i64))`
```
2024-12-13 11:45:24 -08:00
Muhammad Azeez
3cfde7966d Trigger NuGet package publishing when a new release is published (#805)
This makes sure the latest releases are always available on NuGet too
2024-12-05 19:44:33 +03:00
zach
5d18cc71eb chore: fix clippy (#799) 2024-12-02 16:46:48 -08:00
Miles Johnson
4f599d4b20 Change function_exists to &self (#796)
I wrap the `Plugin` instance in a `RwLock` and because `function_exists`
requires `&mut self`, I have to acquire a write lock everytime to just
check if a function exists, which causes lock contention.

This changes it to `&self` since it doesn't need to mutate.
2024-12-02 09:46:38 -08:00
Chris Dickinson
4db57de98e fix: remove unwrap() from extism_compiled_plugin_new
`extism_compiled_plugin_new` would panic on bad manifest input (there's
a test in the python sdk [1] that hits this directly.) Catch the error and
set `errmsg` appropriately instead.

Additionally: golf the function pointer casting for the various `plugin_new` calls,
with the goal of reducing the number of allocations by leaning on iterator size
hints (and reducing the scope of `unsafe{}` use.) This part can be severed: it
introduces a breaking change. Previously `NULL` values were silently accepted in
the `functions**` list; now they fail. This maintains consistency with behavior on
"consumed" `ExtismFunction` pointer.

[1]: https://github.com/extism/python-sdk/blob/main/tests/test_extism.py#L50-L53
v1.9.1
2024-11-25 13:16:00 -08:00
zach
9134635b37 cleanup: return better errors for wasi command modules (#793) 2024-11-25 08:49:57 -08:00
dependabot[bot]
75428f26e2 chore(deps): Bump dawidd6/action-download-artifact from 2 to 6 in /.github/workflows (#792)
Bumps
[dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact)
from 2 to 6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dawidd6/action-download-artifact/releases">dawidd6/action-download-artifact's
releases</a>.</em></p>
<blockquote>
<h2>v6</h2>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/dawidd6/action-download-artifact/compare/v5...v6">https://github.com/dawidd6/action-download-artifact/compare/v5...v6</a></p>
<h2>v5</h2>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/dawidd6/action-download-artifact/compare/v4...v5">https://github.com/dawidd6/action-download-artifact/compare/v4...v5</a></p>
<h2>v4</h2>
<h2>What's Changed</h2>
<ul>
<li><strong>VERSIONING CHANGE</strong>: now there will only be major
releases of this action, e.g. v5, v6 and so on</li>
<li>build(deps): bump undici from 5.28.3 to 5.28.4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/dawidd6/action-download-artifact/pull/284">dawidd6/action-download-artifact#284</a></li>
<li>build(deps): bump <code>@​actions/artifact</code> from 2.1.4 to
2.1.5 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/dawidd6/action-download-artifact/pull/285">dawidd6/action-download-artifact#285</a></li>
<li>build(deps): bump <code>@​actions/artifact</code> from 2.1.5 to
2.1.7 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/dawidd6/action-download-artifact/pull/287">dawidd6/action-download-artifact#287</a></li>
<li>build(deps): bump adm-zip from 0.5.12 to 0.5.13 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/dawidd6/action-download-artifact/pull/289">dawidd6/action-download-artifact#289</a></li>
<li>Set allow_forks to false by default by <a
href="https://github.com/timweri"><code>@​timweri</code></a> in <a
href="https://redirect.github.com/dawidd6/action-download-artifact/pull/290">dawidd6/action-download-artifact#290</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/timweri"><code>@​timweri</code></a> made
their first contribution in <a
href="https://redirect.github.com/dawidd6/action-download-artifact/pull/290">dawidd6/action-download-artifact#290</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/dawidd6/action-download-artifact/compare/v3...v4">https://github.com/dawidd6/action-download-artifact/compare/v3...v4</a></p>
<h2>v3.1.4</h2>
<h2>What's Changed</h2>
<ul>
<li>build(deps): bump adm-zip from 0.5.10 to 0.5.12 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/dawidd6/action-download-artifact/pull/282">dawidd6/action-download-artifact#282</a></li>
<li>build(deps): bump <code>@​actions/artifact</code> from 2.1.2 to
2.1.4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/dawidd6/action-download-artifact/pull/280">dawidd6/action-download-artifact#280</a></li>
<li>fix: accept expired artifacts with documentation url by <a
href="https://github.com/wdconinc"><code>@​wdconinc</code></a> in <a
href="https://redirect.github.com/dawidd6/action-download-artifact/pull/283">dawidd6/action-download-artifact#283</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/wdconinc"><code>@​wdconinc</code></a>
made their first contribution in <a
href="https://redirect.github.com/dawidd6/action-download-artifact/pull/283">dawidd6/action-download-artifact#283</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/dawidd6/action-download-artifact/compare/v3...v3.1.4">https://github.com/dawidd6/action-download-artifact/compare/v3...v3.1.4</a></p>
<h2>v3.1.3</h2>
<h2>What's Changed</h2>
<ul>
<li>node_modules: upgrade by <a
href="https://github.com/dawidd6"><code>@​dawidd6</code></a> in <a
href="https://redirect.github.com/dawidd6/action-download-artifact/pull/276">dawidd6/action-download-artifact#276</a></li>
<li>build(deps): bump <code>@​actions/artifact</code> from 2.1.1 to
2.1.2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/dawidd6/action-download-artifact/pull/277">dawidd6/action-download-artifact#277</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/dawidd6/action-download-artifact/compare/v3.1.2...v3.1.3">https://github.com/dawidd6/action-download-artifact/compare/v3.1.2...v3.1.3</a></p>
<h2>v3.1.2</h2>
<h2>What's Changed</h2>
<ul>
<li>Read workflow_search input as a boolean by <a
href="https://github.com/klutchell"><code>@​klutchell</code></a> in <a
href="https://redirect.github.com/dawidd6/action-download-artifact/pull/273">dawidd6/action-download-artifact#273</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/klutchell"><code>@​klutchell</code></a>
made their first contribution in <a
href="https://redirect.github.com/dawidd6/action-download-artifact/pull/273">dawidd6/action-download-artifact#273</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/dawidd6/action-download-artifact/compare/v3.1.1...v3.1.2">https://github.com/dawidd6/action-download-artifact/compare/v3.1.1...v3.1.2</a></p>
<h2>v3.1.1</h2>
<h2>What's Changed</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="bf251b5aa9"><code>bf251b5</code></a>
node_modules: upgrade</li>
<li><a
href="93c6296611"><code>93c6296</code></a>
README: v5</li>
<li><a
href="deb3bb8325"><code>deb3bb8</code></a>
node_modules: upgrade</li>
<li><a
href="1d93f37db2"><code>1d93f37</code></a>
README: v4</li>
<li><a
href="854e2de939"><code>854e2de</code></a>
Set allow_forks to false by default (<a
href="https://redirect.github.com/dawidd6/action-download-artifact/issues/290">#290</a>)</li>
<li><a
href="436c9d3774"><code>436c9d3</code></a>
build(deps): bump adm-zip from 0.5.12 to 0.5.13 (<a
href="https://redirect.github.com/dawidd6/action-download-artifact/issues/289">#289</a>)</li>
<li><a
href="14040524bb"><code>1404052</code></a>
build(deps): bump <code>@​actions/artifact</code> from 2.1.5 to 2.1.7
(<a
href="https://redirect.github.com/dawidd6/action-download-artifact/issues/287">#287</a>)</li>
<li><a
href="8a9be734dc"><code>8a9be73</code></a>
build(deps): bump <code>@​actions/artifact</code> from 2.1.4 to 2.1.5
(<a
href="https://redirect.github.com/dawidd6/action-download-artifact/issues/285">#285</a>)</li>
<li><a
href="df593bbd04"><code>df593bb</code></a>
build(deps): bump undici from 5.28.3 to 5.28.4 (<a
href="https://redirect.github.com/dawidd6/action-download-artifact/issues/284">#284</a>)</li>
<li><a
href="09f2f74827"><code>09f2f74</code></a>
fix: accept expired artifacts with documentation url (<a
href="https://redirect.github.com/dawidd6/action-download-artifact/issues/283">#283</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/dawidd6/action-download-artifact/compare/v2...v6">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dawidd6/action-download-artifact&package-manager=github_actions&previous-version=2&new-version=6)](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)
You can disable automated security fix PRs for this repo from the
[Security Alerts page](https://github.com/extism/extism/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-25 07:50:29 -08:00
Steve Manuel
7beeee35f1 feat: add overview on generating bindings (#789)
Primarily adds the Generating Bindings section, but also updates the PDK
and SDK list to include more languages.
2024-11-19 22:48:00 -08:00
Chris Dickinson
6cf8251d90 v1.9.0 v1.9.0 2024-11-19 14:11:47 -08:00
zach
4d0799ca37 docs: add comment to fs example (#788)
Since it's using a read-only path, we should provide some information
about how to use a read/write path to make this program run without
failing.
2024-11-15 18:21:29 -08:00
zach
14477ceb39 feat: add CompiledPlugin (#784) 2024-11-14 12:32:22 -08:00
zach
af67a6990c chore: update to wasmtime 26 (#783) 2024-11-07 12:36:58 -08:00
zach
72c47fceaf v1.8.0 v1.8.0 2024-10-22 09:39:13 -07:00
Benjamin Eckel
f52969aadb Add codeowners file (#780) 2024-10-22 09:35:04 -07:00
zach
7775c57a81 fix: use f32::to_bits and f64::to_bits when constructing Val (#779)
Fixes #739
2024-10-22 09:33:04 -07:00
zach
7b6664d019 feat: add ability to access response headers when using extism:host/env::http_request (#774)
- Adds `extism:host/env::http_headers` to access HTTP response headers
- Adds `PluginBuilder::with_http_response_headers` to enable response
headers from Rust
- Adds `extism_plugin_allow_http_response_headers` to enable response
headers using the C API

TODO:
- [x] Update a PDK to use `extism:host/env::http_headers` so I can test
this
2024-10-14 10:09:28 -07:00
Gavin Hayes
a91846a34b fix(plugin_call): set rc to EXIT_SIGNALED_SIGABRT when wasmtime bails out on plugin call (#776)
Fixes #775

134/EXIT_SIGNALED_SIGABRT was chosen as the wasmtime CLI exits with it
executes `unreachable`.
2024-10-10 15:03:59 -04:00
Han Yang
876a3be147 Fix: no method named free found for mutable reference &mut current_plugin::CurrentPlugin in the current scope (#773)
think there's a typo for this block when the `http` feature is disabled
2024-10-04 07:48:29 -07:00
zach
520d72e408 v1.7.0 v1.7.0 2024-09-24 10:17:01 -07:00
zach
3ac3d9abcf cleanup: host takes ownership of memory blocks it gets as arguments (#743)
This PR changes the host to take ownership of memory blocks passed into
Extism host functions, see:
https://github.com/extism/js-sdk/pull/71#issuecomment-2233687933
2024-09-23 10:42:45 -07:00
SebastianHambura
8222164eca Adds more details about with_wasmtime_config() limitations (#770)
PR for https://github.com/extism/extism/pull/764#issuecomment-2368337805

---------

Co-authored-by: Sebastian Hambura <sebastian.hambur@embl.de>
2024-09-23 08:04:29 -07:00
zach
fa81270a5f cleanup(kernel): only try to re-use free blocks before memory.grow (#765)
Updates the kernel to only scan for free blocks before a `memory.grow`
operation, this should improve performance of `alloc` by not iterating
over every block for each allocation.
2024-09-19 15:55:02 -07:00
zach
7bf41c2c7f feat: add PluginBuilder::with_wasmtime_config (#764)
An alternative to #763, this PR allows an initial `wasmtime::Config` to
be passed in when building a plugin. Some of these values may be
overwritten by the Extism runtime, but it allows for things like static
memory size and other low-level details to be handled directly instead
of us having to wrap every option ourselves.
2024-09-19 11:27:27 -07:00
Fabien Benetou
d3a68e2c0c chore: define pdk term in README (#766)
from https://extism.org/docs/concepts/pdk
2024-09-19 08:53:18 -06:00
zach
e31806cdb1 v1.6.0 v1.6.0 2024-09-04 12:23:21 -07:00
zach
c2866a7358 fix: better error handling when plugin runs out of fuel (#762)
- Checks error results to determine if a plugin ran out of fuel, if the
fuel is 0 after we get the error, then we return an out of fuel error
message instead.
- Updates `extism_plugin_error` to check `Plugin::error_msg` regardless
of the kernel's error state
2024-09-04 09:42:09 -07:00
Edoardo Vacchi
34096bd9c0 fix: Vec.as_ptr() might return a dangling pointer (#760)
Both [as_ptr][as_ptr] and [as_mut_ptr][as_mut_ptr] are allowed to return
a dangling raw pointer when the Vec size is 0.

The idea is that you should guard that read checking the size. This
probably works well in most cases, but at the very least in the
java-sdk, the JNA machinery tries to be helpful and it dereferences the
pointer, causing a SIGSEGV.

The solution is to check if the resulting vector is empty and return
null instead. A new, empty vector would be better, but I think that
would not solve the problem, because the problem is caused by a new,
empty vector in the first place.

Caveat: this might break consumers downstream.
On the other hand: consumers that do not check for the nInput, nOutput
counts are just waiting to explode, like JNA.

This addresses https://github.com/extism/java-sdk/issues/27

[as_ptr]:
https://doc.rust-lang.org/std/vec/struct.Vec.html#method.as_ptr
[as_mut_ptr]:
https://doc.rust-lang.org/std/vec/struct.Vec.html#method.as_mut_ptr

Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
2024-09-04 09:41:55 -07:00
zach
d2a3699f43 fix: avoid creating too many externrefs (#759)
Updates plugins to allocate a single `ExternRef` for the host context up
front, to avoid running into the `failed to allocate externref` error
from Wasmtime
2024-08-29 17:24:18 -07:00
Steve Manuel
b6e1caad07 feat(runtime): add log level set/get for pdk control (#758)
Co-authored-by: zach <zach@dylibso.com>
2024-08-28 14:31:55 -06:00
zach
e979987dc7 feat: add ability to limit the number of instructions executed by a plugin (#754)
*Note*: this will be limited for the time being as not all runtimes
support this yet
2024-08-23 10:24:28 -07:00
zach
ef2eeab6e3 chore: include support for wasmtime 23.0.0 (#755) 2024-08-22 12:49:58 -07:00
dependabot[bot]
9da8088ebf chore(deps): Update prost requirement from 0.12.0 to 0.13.1 (#741)
Updates the requirements on [prost](https://github.com/tokio-rs/prost)
to permit the latest version.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/tokio-rs/prost/blob/master/CHANGELOG.md">prost's
changelog</a>.</em></p>
<blockquote>
<h1>Prost version 0.13.1</h1>
<p><em>PROST!</em> is a <a
href="https://developers.google.com/protocol-buffers/">Protocol
Buffers</a> implementation for the <a
href="https://www.rust-lang.org/">Rust Language</a>. <code>prost</code>
generates simple, idiomatic Rust code from <code>proto2</code> and
<code>proto3</code> files.</p>
<h2>Bug fixes</h2>
<ul>
<li>Enum variant named Error causes ambiguous item (<a
href="https://redirect.github.com/tokio-rs/prost/issues/1098">#1098</a>)</li>
</ul>
<h1>PROST version 0.13.0</h1>
<p><strong>note</strong>: this version was yanked in favor of 0.13.1</p>
<p><em>PROST!</em> is a <a
href="https://developers.google.com/protocol-buffers/">Protocol
Buffers</a> implementation for the <a
href="https://www.rust-lang.org/">Rust Language</a>. <code>prost</code>
generates simple, idiomatic Rust code from <code>proto2</code> and
<code>proto3</code> files.</p>
<p>This major update brings new features and fixes:</p>
<h2>Breaking changes</h2>
<ul>
<li>
<p>derive Copy trait for messages where possible (<a
href="https://redirect.github.com/tokio-rs/prost/issues/950">#950</a>)</p>
<p><code>prost-build</code> will automatically derive <code>trait
Copy</code> for some messages. If you manually implement
<code>Copy</code> you should remove your implementation.</p>
</li>
<li>
<p>Change generated functions signatures to remove type parameters (<a
href="https://redirect.github.com/tokio-rs/prost/issues/1045">#1045</a>)</p>
<p>The function signature of <code>trait Message</code> is changed to
use <code>impl Buf</code> instead of a named generic type. If you
implement <code>trait Message</code>, you should change the function
signature.</p>
</li>
<li>
<p>Lightweight error value in TryFrom<!-- raw HTML omitted --> for enums
(<a
href="https://redirect.github.com/tokio-rs/prost/issues/1010">#1010</a>)</p>
<p>When a <code>impl TryFrom&lt;i32&gt;</code> is generated by
<code>prost</code> derive macros, it will now return the error type
<code>UnknownEnumValue</code> instead of <code>DecodeError</code>. The
new error can be used to retreive the integer value that failed to
convert.</p>
</li>
</ul>
<h2>Features</h2>
<ul>
<li>
<p>fix: Only touch include file if contents is changed (<a
href="https://redirect.github.com/tokio-rs/prost/issues/1058">#1058</a>)</p>
<p>Most generated files are untouched when the contents doesn't change.
Use the same mechanism for include file as well.</p>
</li>
</ul>
<h2>Dependencies</h2>
<ul>
<li>update env_logger requirement from 0.10 to 0.11 (<a
href="https://redirect.github.com/tokio-rs/prost/issues/1074">#1074</a>)</li>
<li>update criterion requirement from 0.4 to 0.5 (<a
href="https://redirect.github.com/tokio-rs/prost/issues/1071">#1071</a>)</li>
<li>Remove unused libz-sys (<a
href="https://redirect.github.com/tokio-rs/prost/issues/1077">#1077</a>)</li>
<li>build(deps): update itertools requirement from &gt;=0.10, <!-- raw
HTML omitted -->=0.10, &lt;=0.13 (<a
href="https://redirect.github.com/tokio-rs/prost/issues/1070">#1070</a>)</li>
</ul>
<h2>Documentation</h2>
<ul>
<li>better checking of tag duplicates, avoid discarding invalid variant
errs (<a
href="https://redirect.github.com/tokio-rs/prost/issues/951">#951</a>)</li>
<li>docs: Fix broken link warnings (<a
href="https://redirect.github.com/tokio-rs/prost/issues/1056">#1056</a>)</li>
<li>Add missing LICENSE symlink (<a
href="https://redirect.github.com/tokio-rs/prost/issues/1086">#1086</a>)</li>
</ul>
<h2>Internal</h2>
<ul>
<li>workspace package metadata (<a
href="https://redirect.github.com/tokio-rs/prost/issues/1036">#1036</a>)</li>
<li>fix: Build error due to merge conflict (<a
href="https://redirect.github.com/tokio-rs/prost/issues/1068">#1068</a>)</li>
<li>build: Fix release scripts (<a
href="https://redirect.github.com/tokio-rs/prost/issues/1055">#1055</a>)</li>
<li>chore: Add ci to check MSRV (<a
href="https://redirect.github.com/tokio-rs/prost/issues/1057">#1057</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="f19104a3d4"><code>f19104a</code></a>
chore: prepare 0.13.1 release (<a
href="https://redirect.github.com/tokio-rs/prost/issues/1099">#1099</a>)</li>
<li><a
href="26463f437e"><code>26463f4</code></a>
fix: Enum variant named <code>Error</code> causes ambiguous item (<a
href="https://redirect.github.com/tokio-rs/prost/issues/1098">#1098</a>)</li>
<li><a
href="23f7174969"><code>23f7174</code></a>
chore: Release version 0.13.0 (<a
href="https://redirect.github.com/tokio-rs/prost/issues/1093">#1093</a>)</li>
<li><a
href="7a1424cf8c"><code>7a1424c</code></a>
build: Fix prepare-release.sh (<a
href="https://redirect.github.com/tokio-rs/prost/issues/1094">#1094</a>)</li>
<li><a
href="7790799b0d"><code>7790799</code></a>
build(deps): update itertools requirement from &gt;=0.10, &lt;=0.12 to
&gt;=0.10, &lt;=0....</li>
<li><a
href="4a0cc17102"><code>4a0cc17</code></a>
Add missing LICENSE symlink (<a
href="https://redirect.github.com/tokio-rs/prost/issues/1086">#1086</a>)</li>
<li><a
href="ae33a5ea97"><code>ae33a5e</code></a>
ci: Set rust version of clippy job to a fixed version (<a
href="https://redirect.github.com/tokio-rs/prost/issues/1090">#1090</a>)</li>
<li><a
href="ba77654083"><code>ba77654</code></a>
fix: Only touch include file if contents is changed (<a
href="https://redirect.github.com/tokio-rs/prost/issues/1058">#1058</a>)</li>
<li><a
href="e7049d3eb2"><code>e7049d3</code></a>
workspace package metadata (<a
href="https://redirect.github.com/tokio-rs/prost/issues/1036">#1036</a>)</li>
<li><a
href="ef4930c140"><code>ef4930c</code></a>
docs: Fix broken link warnings (<a
href="https://redirect.github.com/tokio-rs/prost/issues/1056">#1056</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/tokio-rs/prost/compare/v0.12.0...v0.13.1">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 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>

> **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>
2024-08-22 12:49:18 -07:00
dependabot[bot]
7c60b9340a chore(deps): Update cbindgen requirement from 0.26 to 0.27 (#752)
Updates the requirements on
[cbindgen](https://github.com/mozilla/cbindgen) to permit the latest
version.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/mozilla/cbindgen/blob/master/CHANGES">cbindgen's
changelog</a>.</em></p>
<blockquote>
<h1>0.27.0</h1>
<pre><code>  * Revert: The `Config` struct now has a private member.
* Allow users to specify a crate version for bindings generation
([#901](https://github.com/mozilla/cbindgen/issues/901)).
* Update MSRV to 1.74
([#912](https://github.com/mozilla/cbindgen/issues/912),
[#987](https://github.com/mozilla/cbindgen/issues/987)).
* Support #[deprecated] on enum variants
([#933](https://github.com/mozilla/cbindgen/issues/933)).
* Support integrating the package_version information in a header file
comment ([#939](https://github.com/mozilla/cbindgen/issues/939)).
* Add a language backend
([#942](https://github.com/mozilla/cbindgen/issues/942)).
* Support generics with defaulted args
([#959](https://github.com/mozilla/cbindgen/issues/959)).
* Add `VaList` compatibility
([#970](https://github.com/mozilla/cbindgen/issues/970)).
</code></pre>
<h1>0.26.0</h1>
<pre><code>  * Fix swapping of `&gt;&gt;=` and `&lt;&lt;=` in constants.
* Add support for #[deprecated]
([#860](https://github.com/mozilla/cbindgen/issues/860)).
  * Built-in support for bitflags 2.0.
  * Support for &quot;C-unwind&quot; ABI.
* Generate bindings for non-public extern items if they are
#[no_mangle].
</code></pre>
<h2>0.25.0</h2>
<pre><code>  * Re-release of yanked 0.24.6 as a major release
  * Update MSRV to 1.57
* Support variadic arguments (`...`)
([#805](https://github.com/mozilla/cbindgen/issues/805))
* Add --depfile option
([#820](https://github.com/mozilla/cbindgen/issues/820))
  * Breaking changes: The `Config` struct now has a private member.
</code></pre>
<h2>0.24.6 (YANKED: depfile option was breaking, see <a
href="https://redirect.github.com/mozilla/cbindgen/issues/841">#841</a>)</h2>
<pre><code>  * Update MSRV to 1.57
* Support variadic arguments (`...`)
([#805](https://github.com/mozilla/cbindgen/issues/805))
* Add --depfile option
([#820](https://github.com/mozilla/cbindgen/issues/820))
</code></pre>
<h2>0.24.5</h2>
<pre><code>  * Don't enforce tempfile version.
</code></pre>
<h2>0.24.4</h2>
<pre><code> * Move expand infinite recursion fix
([#799](https://github.com/mozilla/cbindgen/issues/799))
* Add with_cpp_compat to the builder
([#796](https://github.com/mozilla/cbindgen/issues/796))
* Handle never type in return position consistently
([#780](https://github.com/mozilla/cbindgen/issues/780))
* Fix warnings ([#816](https://github.com/mozilla/cbindgen/issues/816),
[#819](https://github.com/mozilla/cbindgen/issues/819))
* Updated documentation
([#788](https://github.com/mozilla/cbindgen/issues/788),
[#791](https://github.com/mozilla/cbindgen/issues/791),
[#792](https://github.com/mozilla/cbindgen/issues/792),
[#810](https://github.com/mozilla/cbindgen/issues/810),
[#823](https://github.com/mozilla/cbindgen/issues/823))
</code></pre>
<h2>0.24.3</h2>
<pre><code> * Make struct expressions correctly generated through
typedefs ([#768](https://github.com/mozilla/cbindgen/issues/768)).
</code></pre>
<h2>0.24.2</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="58c6156b0d"><code>58c6156</code></a>
Bump MSRV again for clap.</li>
<li><a
href="103a8de0ac"><code>103a8de</code></a>
Cargo update and version bump.</li>
<li><a
href="67cb560430"><code>67cb560</code></a>
Update CHANGES since v0.26.0</li>
<li><a
href="316298182e"><code>3162981</code></a>
Output condition for globals.</li>
<li><a
href="e469e44c00"><code>e469e44</code></a>
Add missing parens to log message</li>
<li><a
href="3cbb637bbf"><code>3cbb637</code></a>
Update cython expectations from the previous patch.</li>
<li><a
href="785e066e03"><code>785e066</code></a>
Fix variadic arguments when used in function pointer</li>
<li><a
href="aa8ea654e1"><code>aa8ea65</code></a>
deps: Update syn to 2.0</li>
<li><a
href="9f632843b8"><code>9f63284</code></a>
Generalize Item to expose documentation and generic params</li>
<li><a
href="1dda6162e5"><code>1dda616</code></a>
Used documented method of specifying variadic arguments</li>
<li>Additional commits viewable in <a
href="https://github.com/mozilla/cbindgen/compare/0.26.0...v0.27.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-08-22 12:27:18 -07:00
Gavin Hayes
00074fd56d feat: add releasing x86_64-unknown-linux-musl dynamic library (#753)
Fixes https://github.com/extism/extism/issues/735
2024-08-19 14:46:08 -04:00
zach
f0c9640e1e cleanup: allow shadowing host functions (#751) 2024-08-08 13:20:40 -07:00
innuendo
d48dc4021c feat(runtime): support log_trace in rust-sdk (#747)
Add support for logtrace in Rust SDK runtime.

Fix `clippy::needless_borrows_for_generic_args` lints.

Ref: https://github.com/extism/extism/issues/744

Co-authored-by: corda.ilaria@gmail.com <ilariac691@gmail.com>
Co-authored-by: Steve Manuel <steve@dylibso.com>
Co-authored-by: Chris Dickinson <chris@dylibso.com>
2024-07-30 11:53:23 -07:00
Steve Manuel
10e44c0006 chore: use more comprehensive crate source 2024-07-30 10:07:49 -06:00