mirror of
https://github.com/extism/extism.git
synced 2026-04-23 03:00:11 -04:00
kernel-tests
70 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
9415aaa08a |
chore(deps): Update cbindgen requirement from 0.28 to 0.29 (#854)
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.29.0</h1> <ul> <li>Support no-export annotation for statics and functions.</li> <li>Fixed conditional fields of constexpr literal structs</li> <li>Add rename rule for generated associated constant</li> <li>Upgrade heck to 0.5</li> <li>Add support for an optional nullable attribute</li> <li>docs.md: Fix deprecated_with_note and deprecated_variant_with_note being spelled as 'notes'</li> <li>Fix generic with "void" default</li> <li>Fixed error generation of structures using the keyword as inside arrays</li> <li>Added test for unsafe(no_mangle) attribute</li> <li>Fixed handling of trait methods containing the unsafe attribute</li> <li>Rename -Zparse-only</li> </ul> <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> <h1>0.27.0</h1> <ul> <li>Revert: The <code>Config</code> struct now has a private member.</li> <li>Allow users to specify a crate version for bindings generation (<a href="https://redirect.github.com/mozilla/cbindgen/issues/901">#901</a>).</li> <li>Update MSRV to 1.74 (<a href="https://redirect.github.com/mozilla/cbindgen/issues/912">#912</a>, <a href="https://redirect.github.com/mozilla/cbindgen/issues/987">#987</a>).</li> <li>Support #[deprecated] on enum variants (<a href="https://redirect.github.com/mozilla/cbindgen/issues/933">#933</a>).</li> <li>Support integrating the package_version information in a header file comment (<a href="https://redirect.github.com/mozilla/cbindgen/issues/939">#939</a>).</li> <li>Add a language backend (<a href="https://redirect.github.com/mozilla/cbindgen/issues/942">#942</a>).</li> <li>Support generics with defaulted args (<a href="https://redirect.github.com/mozilla/cbindgen/issues/959">#959</a>).</li> <li>Add <code>VaList</code> compatibility (<a href="https://redirect.github.com/mozilla/cbindgen/issues/970">#970</a>).</li> </ul> <h1>0.26.0</h1> <ul> <li>Fix swapping of <code>>>=</code> and <code><<=</code> in constants.</li> <li>Add support for #[deprecated] (<a href="https://redirect.github.com/mozilla/cbindgen/issues/860">#860</a>).</li> <li>Built-in support for bitflags 2.0.</li> <li>Support for "C-unwind" ABI.</li> <li>Generate bindings for non-public extern items if they are #[no_mangle].</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.29.0</h1> <pre><code> * Support no-export annotation for statics and functions. * Fixed conditional fields of constexpr literal structs * Add rename rule for generated associated constant * Upgrade heck to 0.5 * Add support for an optional nullable attribute * docs.md: Fix deprecated_with_note and deprecated_variant_with_note being spelled as 'notes' * Fix generic with "void" default * Fixed error generation of structures using the keyword as inside arrays * Added test for unsafe(no_mangle) attribute * Fixed handling of trait methods containing the unsafe attribute * Rename -Zparse-only </code></pre> <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 `>>=` and `<<=` in constants. * Add support for #[deprecated] ([#860](https://github.com/mozilla/cbindgen/issues/860)). * Built-in support for bitflags 2.0. * Support for "C-unwind" 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 </code></pre> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
168459be0f |
chore(deps): Update criterion requirement from 0.5.1 to 0.6.0 (#852)
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.6.0] - 2025-05-17</h2> <h3>Changed</h3> <ul> <li>MSRV bumped to 1.80</li> <li>The <code>real_blackbox</code> feature no longer has any impact. Criterion always uses <code>std::hint::black_box()</code> now. Users of <code>criterion::black_box()</code> should switch to <code>std::hint::black_box()</code>.</li> <li><code>clap</code> dependency unpinned.</li> </ul> <h3>Fixed</h3> <ul> <li>gnuplot version is now correctly detected when using certain Windows binaries/configurations that used to fail</li> </ul> <h3>Added</h3> <ul> <li>Async benchmarking with Tokio may be done via a <code>tokio::runtime::Handle</code>, not only a <code>tokio::runtime::Runtime</code></li> </ul> <h2>[0.5.1] - 2023-05-26</h2> <h3>Fixed</h3> <ul> <li>Quick mode (--quick) no longer crashes with measured times over 5 seconds when --noplot is not active</li> </ul> <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> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
59acffa8ac |
chore: include wasmtime 30 in supported bounds (#834)
Also updates dependabot config to bundle wasmtime updates so this can be done automatically in the future. |
||
|
|
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) |
||
|
|
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=" |
||
|
|
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: "rand is not a crypto library" (<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> -> <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> -> <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><SmallRng as SeedableRng>::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> -> <code>distr::slice::Choose</code>, <code>distr::EmptySlice</code> -> <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> -> <code>distr::SampleString</code> (<a href="https://redirect.github.com/rust-random/rand/issues/1548">#1548</a>)</li> <li>Rename <code>distr::DistIter</code> -> <code>distr::Iter</code>, <code>distr::DistMap</code> -> <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=" |
||
|
|
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 `>>=` and `<<=` in constants. * Add support for #[deprecated] ([#860](https://github.com/mozilla/cbindgen/issues/860)). * Built-in support for bitflags 2.0. * Support for "C-unwind" 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=" |
||
|
|
af67a6990c | chore: update to wasmtime 26 (#783) | ||
|
|
ef2eeab6e3 | chore: include support for wasmtime 23.0.0 (#755) | ||
|
|
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 `>>=` and `<<=` in constants. * Add support for #[deprecated] ([#860](https://github.com/mozilla/cbindgen/issues/860)). * Built-in support for bitflags 2.0. * Support for "C-unwind" 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=" |
||
|
|
b7fa319cb9 |
Add readonly dirs to allowed_paths (#733)
This is a rough POC for allowing people to whitelist a dir as readonly. When the source path is prefixed with `ro:`, the dir is considered as readonly. This preserved backward compatibility. This suggestion came up in https://github.com/extism/go-sdk/pull/1#discussion_r1276700587 Readonly: ```rs let manifest = Manifest::new([url]) .with_allowed_path("ro:D:/x/rust/fs/data".to_string(), "/data") .with_config_key("path", "/data/data.txt"); ``` ``` trying to read file: "Hello World at 1719851282.5109031sHello World at 1719851299.0819795sHello World at 1719851317.8934608s\n" ----------------------------------------------------- trying to write file: thread '<unnamed>' panicked at src\lib.rs:24:34: called `Result::unwrap()` on an `Err` value: Os { code: 58, kind: Unsupported, message: "Not supported" } note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace thread 'main' panicked at runtime\examples\fs.rs:27:6: called `Result::unwrap()` on an `Err` value: error while executing at wasm backtrace: 0: 0x234d2 - fs.wasm!__rust_start_panic 1: 0x232a1 - fs.wasm!rust_panic 2: 0x231da - fs.wasm!std::panicking::rust_panic_with_hook::hd3fb69bc0aea298a 3: 0x22467 - fs.wasm!std::panicking::begin_panic_handler::{{closure}}::h4d99b90b43f79472 4: 0x223ca - fs.wasm!std::sys_common::backtrace::__rust_end_short_backtrace::h5691573a73161cb1 5: 0x22bca - fs.wasm!rust_begin_unwind 6: 0x303e9 - fs.wasm!core::panicking::panic_fmt::hdb62f5cdb45533e4 7: 0x3234d - fs.wasm!core::result::unwrap_failed::h30d23efcc9e41efc 8: 0x36c2 - fs.wasm!fs::try_write::inner::h0b3b0df8e129f5cc 9: 0x29cd - fs.wasm!try_write 10: 0x35e4a - fs.wasm!try_write.command_export note: using the `WASMTIME_BACKTRACE_DETAILS=1` environment variable may show more debugging information Caused by: wasm trap: wasm `unreachable` instruction executed Stack backtrace: 0: std::backtrace_rs::backtrace::dbghelp64::trace at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library\std\src\..\..\backtrace\src\backtrace\dbghelp64.rs:99 1: std::backtrace_rs::backtrace::trace_unsynchronized at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66 2: std::backtrace::Backtrace::create at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library\std\src\backtrace.rs:331 3: std::backtrace::Backtrace::capture at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library\std\src\backtrace.rs:296 4: anyhow::error::impl$1::from<wasmtime_environ::trap_encoding::Trap> at C:\Users\muham\.cargo\registry\src\index.crates.io-6f17d22bba15001f\anyhow-1.0.86\src\error.rs:565 5: core::convert::impl$3::into<wasmtime_environ::trap_encoding::Trap,anyhow::Error> at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\core\src\convert\mod.rs:759 6: wasmtime_environ::impl$1::into_anyhow<wasmtime_environ::trap_encoding::Trap> at C:\Users\muham\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wasmtime-environ-22.0.0\src\lib.rs:90 7: wasmtime::runtime::trap::from_runtime_box at C:\Users\muham\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wasmtime-22.0.0\src\runtime\trap.rs:118 8: wasmtime::runtime::func::invoke_wasm_and_catch_traps::closure$0<extism::current_plugin::CurrentPlugin,wasmtime::runtime::func::impl$1::call_unchecked_raw::closure_env$0<extism::current_plugin::CurrentPlugin> > at C:\Users\muham\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wasmtime-22.0.0\src\runtime\func.rs:1597 9: enum2$<core::result::Result<tuple$<>,alloc::boxed::Box<wasmtime::runtime::vm::traphandlers::Trap,alloc::alloc::Global> > >::map_err<tuple$<>,alloc::boxed::Box<wasmtime::runtime::vm::traphandlers::Trap,alloc::alloc::Global>,anyhow::Error,wasmtime::runtime: at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\core\src\result.rs:829 10: wasmtime::runtime::func::invoke_wasm_and_catch_traps<extism::current_plugin::CurrentPlugin,wasmtime::runtime::func::impl$1::call_unchecked_raw::closure_env$0<extism::current_plugin::CurrentPlugin> > at C:\Users\muham\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wasmtime-22.0.0\src\runtime\func.rs:1597 11: wasmtime::runtime::func::Func::call_unchecked_raw<extism::current_plugin::CurrentPlugin> at C:\Users\muham\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wasmtime-22.0.0\src\runtime\func.rs:1063 12: wasmtime::runtime::func::Func::call_unchecked<ref_mut$<wasmtime::runtime::store::context::StoreContextMut<extism::current_plugin::CurrentPlugin> > > at C:\Users\muham\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wasmtime-22.0.0\src\runtime\func.rs:1049 13: wasmtime::runtime::func::Func::call_impl_do_call<extism::current_plugin::CurrentPlugin> at C:\Users\muham\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wasmtime-22.0.0\src\runtime\func.rs:1243 14: wasmtime::runtime::func::Func::call<ref_mut$<wasmtime::runtime::store::Store<extism::current_plugin::CurrentPlugin> > > at C:\Users\muham\.cargo\registry\src\index.crates.io-6f17d22bba15001f\wasmtime-22.0.0\src\runtime\func.rs:1002 15: extism::plugin::Plugin::raw_call<ref$<str$>,ref$<str$> > at .\src\plugin.rs:753 16: extism::plugin::Plugin::call<ref$<str$>,ref$<str$>,ref$<str$> > at .\src\plugin.rs:900 17: fs::main at .\examples\fs.rs:25 18: core::ops::function::FnOnce::call_once<void (*)(),tuple$<> > at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\core\src\ops\function.rs:250 19: core::hint::black_box at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\core\src\hint.rs:337 20: std::sys_common::backtrace::__rust_begin_short_backtrace<void (*)(),tuple$<> > at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\std\src\sys_common\backtrace.rs:155 21: std::rt::lang_start::closure$0<tuple$<> > at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\std\src\rt.rs:166 22: std::rt::lang_start_internal at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library\std\src\rt.rs:148 23: std::rt::lang_start<tuple$<> > at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\std\src\rt.rs:165 24: main 25: invoke_main at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78 26: __scrt_common_main_seh at D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288 27: BaseThreadInitThunk 28: RtlUserThreadStart stack backtrace: 0: std::panicking::begin_panic_handler at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library\std\src\panicking.rs:645 1: core::panicking::panic_fmt at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library\core\src\panicking.rs:72 2: core::result::unwrap_failed at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6/library\core\src\result.rs:1654 3: enum2$<core::result::Result<ref$<str$>,anyhow::Error> >::unwrap at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\core\src\result.rs:1077 4: fs::main at .\examples\fs.rs:25 5: core::ops::function::FnOnce::call_once<void (*)(),tuple$<> > at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\core\src\ops\function.rs:250 6: core::hint::black_box at /rustc/9b00956e56009bab2aa15d7bff10916599e3d6d6\library\core\src\hint.rs:337 note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. error: process didn't exit successfully: `D:\dylibso\extism\target\debug\examples\fs.exe` (exit code: 101) ``` Writable: ```rs let manifest = Manifest::new([url]) .with_allowed_path("D:/x/rust/fs/data".to_string(), "/data") .with_config_key("path", "/data/data.txt"); ``` ``` trying to read file: "Hello World at 1719851282.5109031sHello World at 1719851299.0819795sHello World at 1719851317.8934608s\n" ----------------------------------------------------- trying to write file: "Hello World at 1719851282.5109031sHello World at 1719851299.0819795sHello World at 1719851317.8934608s\nHello World at 1719851500.7803263s\n" done! ``` |
||
|
|
17a546b2db | chore: support for wasmtime 22 (#731) | ||
|
|
9dbc22830e |
fix: use wasi-common to avoid issues with tokio (#728)
See https://github.com/bytecodealliance/wasmtime/issues/8799 I will make a 1.4.1 release after this is merged |
||
|
|
c4b82e3eda |
fix(libextism): improve static linking pkgconfig (#726)
This includes three fixes: * link static library by absolute path (should fix static linking on Mac/ with `lld`) * link static library with `-framework Security` on Mac * link `libpthread` , this should be a no-op on systems with modern libc, but should fix static linking on systems with glibc pre 2.34 see https://developers.redhat.com/articles/2021/12/17/why-glibc-234-removed-libpthread and error http://www.cpantesters.org/cpan/report/669fdfc8-25a4-11ef-9502-51fb6d8775ea --------- Co-authored-by: zach <zachshipko@gmail.com> Co-authored-by: zach <zach@dylibso.com> |
||
|
|
3f54892a39 |
refactor!: update to wasmtime 20 or greater (#723)
- Breaking: No longer copies Extism config values into WASI environment variables because the new interface doesn't allow for the environment to be updated - these should be accessed using the Extism config functions instead - Requires wasmtime 20 or greater - Enables wasm-gc - Similar to https://github.com/extism/extism/pull/697 without sockets or additional support for command modules |
||
|
|
1a083f612a |
feat(convert): add derive macros for To and FromBytes (#667)
closes #661. - [x] docs - [x] tests - [x] depend on `extism-convert/extism-pdk-path` feature in https://github.com/extism/rust-pdk https://github.com/extism/rust-pdk/pull/47 |
||
|
|
efa69d3668 | chore: support for wasmtime 17.0.0 (#665) | ||
|
|
d5dc9b41ab |
feat: Use quickcheck to test allocations, fix one bug that was uncovered. (#662)
- Adds quickcheck tests for alloc/free/load/store from the kernel, I wasn't able to include these in the new wasm-bindgen tests because `getrandom` isn't available on wasm32-unknown-unknown - Fixes a bug in the calculation of how much memory is needed to allocate the next block in the kernel. This bug is triggered when allocating at the end of a page, the size of the MemoryBlock value wasn't being taken in consideration when determining whether or not to call memory.grow |
||
|
|
950a0f449f |
Toggle off default clap feature for cbindgen (#644)
The only feature for `cbindgen` is the `clap` feature for using it as a standalone binary and isn't needed when using it as a library |
||
|
|
c8868c37d8 | chore: update wasmtime bounds to include 16.0.0 (#642) | ||
|
|
f7d297f98f |
build: drive crate versions from workspace; drive workspace version from ci (#604)
This is an attempt to sand down [a sharp edge](https://github.com/extism/extism/actions/runs/6949120346/job/18906546065#step:4:476) around releases – keeping the `Cargo.toml` versions in-sync with the release tag, & the versions of the workspace crates aligned with one another. |
||
|
|
15c30dfa8c | fix: forgot to update the runtime version | ||
|
|
7411eef7b0 | release: 1.0.0-rc3 (#603) | ||
|
|
6e49548ca3 | chore: support wasmtime 15 (#601) | ||
|
|
2a24d13c9b |
refactor!: use tracing crate for logging, add extism_log_callback function (#578)
- Uses `tracing` instead of `log` crate - Uses `tracing-subscriber` instead of `fern` - This allows us to automatically capture `log` events using `tracing-subscriber` - Breaking: Makes `extism::set_log_file` private and only used through the C API, Rust users should use `tracing-subscriber` to determine which filters/levels to log. - Adds `extism::set_log_callback` function to set a callback that can be used for custom logging from Rust. - Adds `bool extism_log_custom(const char *level)` and `extism_log_drain(void (*fn)(const char *s, size_t length)` to the C API to enable custom sinks in other SDKs |
||
|
|
a1cf591de5 | release 1.0.0-rc2 (#588) | ||
|
|
719462ba61 | 1.0.0-beta.0 (#587) | ||
|
|
91257f0a54 |
cleanup: simplify logging, include plugin ID in log messages (#573)
My initial goal was to make logging configurable for each plugin instead of global but wasn't able to accomplish that in this PR (still looking into it) - Switches from `log4rs` to `fern` - this significantly simplifies the logging code - Also considered `simplelog` - Adds `plugin.id` to the logs whenever available - Uses `extism::plugin::$id` target for functions logged from the PDK |
||
|
|
4bd0ed6d03 |
feat: add ability to dump extism kernel memory and generate coredumps, cleanup kernel memory layout (#539)
Fixes https://github.com/extism/extism/issues/537 - Requires wasmtime 14.0.0 or greater for coredump serialization - Adds `EXTISM_COREDUMP` environment variable to write wasmtime coredump to a file when an error occurs - This will create a coredump from the main wasm module, which means it doesn't give us too much insight into the kernel - Adds `EXTISM_MEMDUMP` environment variable to write extism linear memory to a file when an error occurs - This gives us access to the kernel memory - Adds some missing profiling options - Converts timeouts to a Trap instead of a plain error, this helps us get better information about where the timeout occured - Some small improvements to error handling after a plugin call - Adds a test for coredump and memdump generation - Adds the ability to configure debug options using `PluginBuilder` - Fixes memory layout and a wasted page of memory in the kernel, found while debugging a memory dump --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: zshipko <zshipko@users.noreply.github.com> |
||
|
|
8ff9b9a015 | chore: support wasmtime 14.0.0 (#529) | ||
|
|
6f4b43bedc |
feat: add benchmarking, optimize bounds checking in the kernel (#505)
- Adds benchmarking, run with `cargo bench` or `cargo criterion` - Adds `MemoryRoot::pointer_in_bounds_fast` to do less precise bounds checking in loads/stores --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: zshipko <zshipko@users.noreply.github.com> |
||
|
|
bc56d7303a |
docs: Add readme, bump convert crate (#495)
Co-authored-by: zach <zach@dylibso.com> |
||
|
|
08db39c153 |
chore: bump wasmtime lower bound to 13.0.0, remove wasi-nn support (#483)
- Updates to wasmtime 13.0.0 as the lowest supported version - Removes `wasmtime-wasi-nn` support because it now takes parameters to specify particular backends and registries during initialization. Since I don't think anyone is using the `nn` feature I chose to remove it for now, but we could also expand the manifest to add these options. |
||
|
|
98a4244915 |
chore(deps): Update toml requirement from 0.7 to 0.8 (#459)
Updates the requirements on [toml](https://github.com/toml-rs/toml) to permit the latest version. <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
326a4c86a8 |
chore(deps): Update cbindgen requirement from 0.25 to 0.26 (#460)
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> <h2>0.26.0</h2> <ul> <li>Fix swapping of <code>>>=</code> and <code><<=</code> in constants.</li> <li>Add support for #[deprecated] (<a href="https://redirect.github.com/mozilla/cbindgen/issues/860">#860</a>).</li> <li>Built-in support for bitflags 2.0.</li> <li>Support for "C-unwind" ABI.</li> <li>Generate bindings for non-public extern items if they are #[no_mangle].</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.26.0</h1> <pre><code> * Fix swapping of `>>=` and `<<=` in constants. * Add support for #[deprecated] ([#860](https://github.com/mozilla/cbindgen/issues/860)). * Built-in support for bitflags 2.0. * Support for "C-unwind" 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> <pre><code> * Make bitfield operators use explicit constructors. </code></pre> <h2>0.24.1</h2> <pre><code> * Add support for unary negation ([#765](https://github.com/mozilla/cbindgen/issues/765)). * Make more bitfield operators constexpr ([#765](https://github.com/mozilla/cbindgen/issues/765)). </code></pre> <h2>0.24.0</h2> <pre><code> * Basic const generic support ([#759](https://github.com/mozilla/cbindgen/issues/759), [#760](https://github.com/mozilla/cbindgen/issues/760) [#762](https://github.com/mozilla/cbindgen/issues/762)). </code></pre> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
cb55e52506 |
feat: Add extism-convert crate and use it for input/output to plugin calls (#443)
- Adds `extism-convert` crate with `ToBytes`, `FromBytes` and `FromBytesOwned` traits - This serves as a single interface for reading/writing rich types from WebAssembly linear memory. - Supports `Json` and `Msgpack` and `Protobuf` encodings out-of-the-box - Updates `Plugin::call` to take `ToBytes` as the input argument and return a `FromBytes` value - Adds `host_fn!` macro to simplify host function creation - Cleans up generated documentation a little - PR for the Rust PDK: https://github.com/extism/rust-pdk/pull/31 - Adds a `typed_plugin!` macro to implement type-safe wrappers around `Plugin` - After this we should focus on adding similar type-conversion helpers to the SDKs and other PDKs to make it easier to use across languages. For example, a Python host running a Rust plugin using Msgpack encoded types. ## Examples ### Calling a function Instead of the untyped, bytes-only `call` function: ```rust let output = plugin.call("func_name", "my data").unwrap(); let output: MyType = serde_json::from_slice(&output).unwrap(); ``` We can now use richer types to encode/decode our values directly when using `call`: ```rust let Json(output) = plugin.call::<_, Json<MyType>>("func_name", "my data").unwrap(); ``` ### Allocating inside of a host function The same interface works for host functions, so instead of: ```rust fn hello_world( plugin: &mut CurrentPlugin, inputs: &[Val], outputs: &mut [Val], _user_data: UserData, ) -> Result<(), Error> { let handle = plugin.memory_handle_val(&inputs[0])?; let input = plugin.memory_read_str(handle)?; let output = plugin.memory_alloc_bytes(&input).unwrap(); outputs[0] = output.into(); Ok(()) } ``` Becomes: ```rust fn hello_world( plugin: &mut CurrentPlugin, inputs: &[Val], outputs: &mut [Val], _user_data: UserData, ) -> Result<(), Error> { let my_value: String = plugin.memory_get_val(&inputs[0])?; let output = plugin.memory_new(&my_value)?; outputs[0] = plugin.memory_to_val(output); Ok(()) } ``` Although this isn't much of an improvement, using the `host_fn` macro, we can really begin to see how the above function is really just an identity function: ```rust host_fn!(hello_world(a: String) -> String { a }); ``` ### typed_plugin! `typed_plugin!` is used to make a typed wrapper around a Plugin: ```rust /// Create the typed plugin typed_plugin!(Testing { count_vowels(&str) -> Json<Count> }); /// Create the `Plugin` and convert it to `Testing` wrapper let mut plugin: Testing = Plugin::new(WASM, [f], true).unwrap().into(); /// Call the `count_vowels` function: let Json(output0): Json<Count> = plugin.count_vowels("abc123")?; ``` It could make sense to convert `host_fn` and/or `typed_plugin` to proc-macros at some point, but for now they work and provide some flexibility in experimenting with the interfaces. Another future update could be to figure out a nice way to make it so input can be written in multiple chunks, so the entire input doesn't have to get copied into memory at once. |
||
|
|
ddcbeec3de |
refactor!: Remove context, unify extism-runtime and extism crates (#421)
- Removes the `ExtismContext` type from runtime and all SDKs - Removed SDK functions: `extism_context_new`, `extism_context_reset`, `extism_context_free` - All SDKs have been updated, but there are still some TODOs below - Removes `extism_plugin_update` - Plugins can no longer be updated - a new plugin should be created instead - Adds `extism_plugin_id` to uniquely identify plugins - Merges the `extism-runtime` and `extism` crates (there is no longer an `extism-runtime` crate) - Makes `extism::Manifest` an alias for `extism_manifest::Manifest` instead of a distinct type - Adds `MemoryHandle` type to SDKs to refer to blocks of Extism memory that can be accessed in host functions - Improves thread-safety of Plugins, adds C++ test to call a single plugin from multiple threads. - Expands wasmtime bounds to include 12.0 |
||
|
|
d13301a346 |
chore(deps): Update cbindgen requirement from 0.24 to 0.25 (#434)
Updates the requirements on [cbindgen](https://github.com/eqrion/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> <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/eqrion/cbindgen/issues/805)) * Add --depfile option ([#820](https://github.com/eqrion/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/eqrion/cbindgen/issues/841">#841</a>)</h2> <pre><code> * Update MSRV to 1.57 * Support variadic arguments (`...`) ([#805](https://github.com/eqrion/cbindgen/issues/805)) * Add --depfile option ([#820](https://github.com/eqrion/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/eqrion/cbindgen/issues/799)) * Add with_cpp_compat to the builder ([#796](https://github.com/eqrion/cbindgen/issues/796)) * Handle never type in return position consistently ([#780](https://github.com/eqrion/cbindgen/issues/780)) * Fix warnings ([#816](https://github.com/eqrion/cbindgen/issues/816), [#819](https://github.com/eqrion/cbindgen/issues/819)) * Updated documentation ([#788](https://github.com/eqrion/cbindgen/issues/788), [#791](https://github.com/eqrion/cbindgen/issues/791), [#792](https://github.com/eqrion/cbindgen/issues/792), [#810](https://github.com/eqrion/cbindgen/issues/810), [#823](https://github.com/eqrion/cbindgen/issues/823)) </code></pre> <h2>0.24.3</h2> <pre><code> * Make struct expressions correctly generated through typedefs ([#768](https://github.com/eqrion/cbindgen/issues/768)). </code></pre> <h2>0.24.2</h2> <pre><code> * Make bitfield operators use explicit constructors. </code></pre> <h2>0.24.1</h2> <pre><code> * Add support for unary negation ([#765](https://github.com/eqrion/cbindgen/issues/765)). * Make more bitfield operators constexpr ([#765](https://github.com/eqrion/cbindgen/issues/765)). </code></pre> <h2>0.24.0</h2> <pre><code> * Basic const generic support ([#759](https://github.com/eqrion/cbindgen/issues/759), [#760](https://github.com/eqrion/cbindgen/issues/760) [#762](https://github.com/eqrion/cbindgen/issues/762)). * Suffixes on integer literals are now honored to avoid narrowing ([#764](https://github.com/eqrion/cbindgen/issues/764)). </code></pre> <h2>0.23.0</h2> <pre><code> * Better support for constexpr. ([#756](https://github.com/eqrion/cbindgen/issues/756)) * constexpr is now enabled by default in C++ mode. You can use const.allow_constexpr=false to revert to previous behavior. ([#756](https://github.com/eqrion/cbindgen/issues/756)) * Minimum syn version no longer parses old rust code. ([#754](https://github.com/eqrion/cbindgen/issues/754)) </code></pre> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href=" |
||
|
|
e86398a612 |
release: Bump runtime to 0.5.0 (#427)
Co-authored-by: zach <zach@dylibso.com> |
||
|
|
07623ef2da |
fix: avoid timeout errors outside of extism_plugin_call (#407)
- Delays instantiation to right before a call by using `instantiate_pre` instead. This fixes an issue with the assemblyscript PDK. - Makes timeouts only apply to calls - Also bumps the wasmtime lower-bounds to 10.0, because the return type of the epoch callback has changed |
||
|
|
c7c7f9d024 | chore: update wasmtime bounds to include 11.0 (#405) | ||
|
|
3da526286e |
feat: Implement parts of the extism runtime in WebAssembly (#384)
This PR adds the `kernel` directory which contains a port of the Extism memory allocator compiled to WebAssembly and removes `runtime/src/memory.rs` completely. Being able to re-use memory functions as a WASM module allows us to begin to experiment with porting Extism to new runtimes! This is in a draft state while I'm verifying some of these changes. |
||
|
|
f606ab619f |
chore: use a range for wasmtime dependency version (#375)
Currently wasmtime `8.0.0` - `10.0.0` are compatible with `extism-runtime`, in the interest of remaining compatible with as many applications as possible, this PR updates the wasmtime version requirement from a single version to a range of acceptable versions. |
||
|
|
d0f77dd886 |
release: Bump runtime to 0.4.0 (#340)
## Breaking Changes * https://github.com/extism/extism/pull/315 HTTP calls will be disallowed by default now. If you want to enable HTTP you need to specify the hosts that the plug-in is allowed to communicate with. If you want to allow all hosts you can set it to `{allowed_hosts: ["*"]}` in the manifest. However, this isn't recommended unless you have some trust in the plug-in or are controlling the networking by some other means. * https://github.com/extism/extism/pull/335 In this PR we are creating an implicit context so people don't need to know about it if they don't care. In some languages function signatures have changed to make context an optional argument when creating a plug-in. |
||
|
|
48699a0126 | chore: update to wasmtime 8.0.0 (#323) | ||
|
|
8d76cf0440 |
release: 0.3.0 (#281)
Co-authored-by: zach <zach@dylib.so> |
||
|
|
12373ca34a | chore: update to wasmtime 6.0.1 (#276) | ||
|
|
581e9cea99 |
chore: update wasmtime to 6.0, bump extism versions (#247)
Unsure if now is the best time to do the `extism` crate version bumps, but I figured they'd need to happen at some point in the near future anyways. Happy to revert if there is any opposition. Also, I added back the local `path` property to the Elixir NIF crate manifest. I want to see if this breaks again in CI, or if we can leave it. --------- Co-authored-by: zach <zach@dylib.so> |
||
|
|
226155b959 | chore: update toml to 0.7 (#245) | ||
|
|
c94c221854 |
release: v0.2.0 (#209)
Let's get the last changes in this week for a release. Will hold this PR until all changes we want are in. Release checklist: - [x] test: updates across CI to test for Host Function output / integration (#219) - this should probably look something like a grep for some kind of output proving guest/host interop? - [x] Fix for userData pointer issue in Go host functions (#220) - [x] docs: Host Functions in SDKs - [ ] sdk: C - [ ] sdk: C++ - [ ] sdk: Python - [ ] sdk: Node - [ ] sdk: Go - [ ] sdk: Rust - [x] docs: Manifest property names (http `headers` & memory `max_pages`) - [ ] blog: announcing v0.2.0, including host functions, Zig SDK/PDK, Java SDK, .NET SDK, + ... |