<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="/rss.xsl.xml"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
    <title>Changes in externref.c</title>
    <description></description>
    <language>en</language>
    <copyright>Copyright 2015</copyright>
    <generator>Java</generator><item>
        <title>adff9d9d - Fix externref/anyref ownership in C/C++ API (#11799)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/examples/externref.c#adff9d9d</link>
        <description>Fix externref/anyref ownership in C/C++ API (#11799)* Fix externref/anyref ownership in C/C++ APIThis commit is a follow-up to #11514 which was discovered throughfailing tests in the wasmtime-py repository when updating to Wasmtime37.0.0. Effectively a combination of bugs in the Rust API meant that itwasn&apos;t possible to use `externref` or `anyref` bindings correctly. TheRust changes in this commit are:* `wasmtime_val_unroot` correctly drops the value now as opposed to  effectively being a noop from before (typo of using `as_externref` vs  `from_externref`).* `wasmtime_{anyref,externref,val}_t` now have a `Drop` implementation  in Rust to correctly drop them if a value in Rust is dropped. This is  required to correctly manage memory in the `wasmtime_func_{call,new}`  implementations, for example.* `wasmtime_{anyref,externref,val}_clone` no longer have an unnecessary  context parameter.* `wasmtime_{anyref,externref,val}_unroot` no longer have an unnecessary  context parameter.Changes in the C/C++ APIs are:* `Result::{ok,err}_ref` APIs were added in addition to the preexisting  rvalue accessors.* Loading/storing typed arguments now has an overload for `const T&amp;` and  `T&amp;&amp;` which behaves differently. Notably transferring ownership for  `T&amp;&amp;` and not for `const T&amp;`. This means that passing parameters when  calling a wasm function uses `const T&amp;`, but passing results from a  host import uses `T&amp;&amp;`.* `TypedFunc::call` now uses `const Params&amp;` instead of `Params` to  explicitly specify it doesn&apos;t modify the parameters and forces using  the `const T&amp;` store method.* `Store::gc` is now a convenience method for `store.context().gc()`* `ExternRef`, `AnyRef`, and `Val` now have ownership semantics and  destructors. This matches the spirit of #11514 for Rust but models it  in C++ as well. This required filling out move/copy  constructors/assignments.* The explicit `ExternRef` now takes `std::any` instead of `T`.* Minor issues related to ownership are fixed in `Val` bindings.Valgrind was used to ensure that there were no leaks for the test suitewhich additionally resulted in a number of `*_delete` calls being addedto tests using the C API (accidental omissions).The original goal of this change was to be a patch release for 37.0.1 toenable updating wasmtime-py to the 37.0.x releases of Wasmtime. In theend though the changes here were broad enough that I no longer feel thatthis is a good idea, so wasmtime-py will be skipping the 37 version ofWasmtime.* Run `clang-format`prtest:full

            List of files:
            /wasmtime-44.0.1/examples/externref.c</description>
        <pubDate>Tue, 07 Oct 2025 16:36:13 +0000</pubDate>
        <dc:creator>Alex Crichton &lt;alex@alexcrichton.com&gt;</dc:creator>
    </item>
<item>
        <title>57ba95e9 - Fixed bugs in the C thread example program and updated some comments for build command. (#11155)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/examples/externref.c#57ba95e9</link>
        <description>Fixed bugs in the C thread example program and updated some comments for build command. (#11155)* Remove the cargo command for examples/*.c and fix thread example code.* Add _GNU_SOURCE.

            List of files:
            /wasmtime-44.0.1/examples/externref.c</description>
        <pubDate>Mon, 30 Jun 2025 17:37:35 +0000</pubDate>
        <dc:creator>Masashi Yoshimura &lt;yoshimura.masashi.frbs@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>77405cc8 - c-api: Remove allocations from `wasmtime_val_t` (#8451)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/examples/externref.c#77405cc8</link>
        <description>c-api: Remove allocations from `wasmtime_val_t` (#8451)* c-api: Remove allocations from `wasmtime_val_t`This commit redesigns how GC references work in the C API. previously`wasmtime_{any,extern}ref_t` were both opaque pointers in the C APIrepresented as a `Box`. Wasmtime did not, however, provide the abilityto deallocate just the `Box` part. This was intended to be handled withunrooting APIs but unrooting requires a `wasmtime_context_t` parameter,meaning that destructors of types in other languages don&apos;t have asuitable means of managing the memory around the`wasmtime_{any,extern}ref_t` which might lead to leaks.This PR takes an alternate approach for the representation of thesetypes in the C API. Instead of being an opaque pointer they&apos;re nowactual structures with definitions in the header file. These structuresmirror the internals in Rust and Rust is tagged to ensure that changesare reflected in the C API as well. This is similar to how`wasmtime_func_t` matches `wasmtime::Func`. This enables embedders tonot need to worry about memory management of these values outside of themanual rooting otherwise required.The hope is that this will reduce the likelihood of memory leaks andotherwise not make it any harder to manage references in the C API.* Run clang-format* Review comments* Replace macros with inline functions* Add explicit accessors/constructors for the C API* Fix C example* Fix doc link* Fix some doc issuesprtest:full* Fix doxygen links

            List of files:
            /wasmtime-44.0.1/examples/externref.c</description>
        <pubDate>Wed, 24 Apr 2024 21:38:28 +0000</pubDate>
        <dc:creator>Alex Crichton &lt;alex@alexcrichton.com&gt;</dc:creator>
    </item>
<item>
        <title>81d71873 - Fix use-after-free in externref example (#8410)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/examples/externref.c#81d71873</link>
        <description>Fix use-after-free in externref example (#8410)* Fix use-after-free in externref exampleThis fixes a typo in the `externref.c` example where a deallocated`wasmtime_val_t` was used by accident. Additionally this introducesscoping to prevent this from arising again.* Run clang-format* Fix compilation of C example

            List of files:
            /wasmtime-44.0.1/examples/externref.c</description>
        <pubDate>Fri, 19 Apr 2024 15:42:03 +0000</pubDate>
        <dc:creator>Alex Crichton &lt;alex@alexcrichton.com&gt;</dc:creator>
    </item>
<item>
        <title>23640b6c - wasmtime-c-api: Add support for GC references in `wasmtime.h` APIs (#8346)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/examples/externref.c#23640b6c</link>
        <description>wasmtime-c-api: Add support for GC references in `wasmtime.h` APIs (#8346)Restores support for `externref` in `wasmtime_val_t`, methods for manipulatingthem and getting their wrapped host data, and examples/tests for these things.Additionally adds support for `anyref` in `wasmtime_val_t`, clone/delete methodssimilar to those for `externref`, and a few `i31ref`-specific methods. Also addsC and Rust example / test for working with `anyref`.

            List of files:
            /wasmtime-44.0.1/examples/externref.c</description>
        <pubDate>Sat, 13 Apr 2024 18:17:03 +0000</pubDate>
        <dc:creator>Nick Fitzgerald &lt;fitzgen@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>93580f24 - examples: Don&apos;t `fread()` within `assert(...)`. (#7803)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/examples/externref.c#93580f24</link>
        <description>examples: Don&apos;t `fread()` within `assert(...)`. (#7803)This is fine in debug builds but release builds without assertionsresults in the file data not being read.

            List of files:
            /wasmtime-44.0.1/examples/externref.c</description>
        <pubDate>Mon, 22 Jan 2024 17:10:14 +0000</pubDate>
        <dc:creator>Bruce Mitchener &lt;bruce.mitchener@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>f8fee938 - add clang format (#7601)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/examples/externref.c#f8fee938</link>
        <description>add clang format (#7601)* add clang-formatWe chose WebKit style because out of all the builtin styles it seems theclosest to what already exists in wasmtime.Signed-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;* c-api: don&apos;t reorder headersThe order here mattersSigned-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;* c-api: apply clang-formatSigned-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;* fiber: apply clang-formatSigned-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;* runtime: apply clang-formatSigned-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;* examples: apply clang formatSigned-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;* tests: apply clang-formatSigned-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;* ci: add clang-format checksSigned-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;* clang-format: keep braces on the same lineThis is more the existing styleSigned-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;* remove clang-formatJust use the tool defaults (LLVM)Signed-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;* Fix ci nameSigned-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;* manually reformat a couple of commentsprtest:fullSigned-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;* disable formatting for doc-wasm.hSigned-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;* manually reformat wasmtime.hSigned-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;* disable formattingTo prevent a link from being brokenSigned-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;* examples: fixing build commandsSigned-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;* fix parameter commentSigned-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;---------Signed-off-by: Tyler Rockwood &lt;rockwood@redpanda.com&gt;

            List of files:
            /wasmtime-44.0.1/examples/externref.c</description>
        <pubDate>Wed, 29 Nov 2023 18:39:04 +0000</pubDate>
        <dc:creator>Tyler Rockwood &lt;rockwotj@users.noreply.github.com&gt;</dc:creator>
    </item>
<item>
        <title>2ba3025e - Add cmake compatibility to c-api (#4369)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/examples/externref.c#2ba3025e</link>
        <description>Add cmake compatibility to c-api (#4369)* Add cmake compatibility to c-api* Add CMake documentation to wasmtime.h* Add CMake instructions in examples* Modify CI for CMake support* Use correct rust in CI* Trigger build* Refactor run-examples* Reintroduce example_to_run in run-examples* Replace run-examples crate with cmake* Fix markdown formatting in examples readme* Fix cmake test quotes* Build rust wasm before cmake tests* Pass CTEST_OUTPUT_ON_FAILURE* Another cmake test* Handle os differences in cmake test* Fix bugs in memory and multimemory examples

            List of files:
            /wasmtime-44.0.1/examples/externref.c</description>
        <pubDate>Fri, 22 Jul 2022 17:22:36 +0000</pubDate>
        <dc:creator>TheGreatRambler &lt;31906920+TheGreatRambler@users.noreply.github.com&gt;</dc:creator>
    </item>
<item>
        <title>7a1b7cdf - Implement RFC 11: Redesigning Wasmtime&apos;s APIs (#2897)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/examples/externref.c#7a1b7cdf</link>
        <description>Implement RFC 11: Redesigning Wasmtime&apos;s APIs (#2897)Implement Wasmtime&apos;s new API as designed by RFC 11. This is quite a large commit which has had lots of discussion externally, so for more information it&apos;s best to read the RFC thread and the PR thread.

            List of files:
            /wasmtime-44.0.1/examples/externref.c</description>
        <pubDate>Thu, 03 Jun 2021 14:10:53 +0000</pubDate>
        <dc:creator>Alex Crichton &lt;alex@alexcrichton.com&gt;</dc:creator>
    </item>
<item>
        <title>f94db655 - Update WebAssembly C API submodule to latest commit. (#2579)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/examples/externref.c#f94db655</link>
        <description>Update WebAssembly C API submodule to latest commit. (#2579)* Update WebAssembly C API submodule to latest commit.This commit updates the WebAssembly C API submodule (for `wasm.h`) to thelatest commit out of master.This fixes the behavior of `wasm_name_new_from_string` such that it no longercopies the null character into the name, which caused unexpected failures whenusing the Wasmtime linker as imports wouldn&apos;t resolve when the null waspresent.Along with this change were breaking changes to `wasm_func_call`, the hostcallback signatures, and `wasm_instance_new` to take a vector type instead of apointer to an unsized array.As a result, Wasmtime language bindings based on the C API will need to beupdated once this change is pulled in.Fixes #2211.Fixes #2131.* Update Doxygen comments for wasm.h changes.

            List of files:
            /wasmtime-44.0.1/examples/externref.c</description>
        <pubDate>Thu, 14 Jan 2021 15:36:12 +0000</pubDate>
        <dc:creator>Peter Huene &lt;peter@huene.dev&gt;</dc:creator>
    </item>
<item>
        <title>eb650f6f - filesystem example (#2236)</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/examples/externref.c#eb650f6f</link>
        <description>filesystem example (#2236)

            List of files:
            /wasmtime-44.0.1/examples/externref.c</description>
        <pubDate>Tue, 29 Sep 2020 18:20:14 +0000</pubDate>
        <dc:creator>Joshua Warner &lt;joshuawarner32@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>56c517d2 - examples: Add a GC call to the externref C example</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/examples/externref.c#56c517d2</link>
        <description>examples: Add a GC call to the externref C example

            List of files:
            /wasmtime-44.0.1/examples/externref.c</description>
        <pubDate>Tue, 21 Jul 2020 16:39:04 +0000</pubDate>
        <dc:creator>Nick Fitzgerald &lt;fitzgen@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>a817470f - Fix signature of wasmtime_module_new</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/examples/externref.c#a817470f</link>
        <description>Fix signature of wasmtime_module_new

            List of files:
            /wasmtime-44.0.1/examples/externref.c</description>
        <pubDate>Wed, 15 Jul 2020 19:07:36 +0000</pubDate>
        <dc:creator>Yury Delendik &lt;ydelendik@mozilla.com&gt;</dc:creator>
    </item>
<item>
        <title>89603bc6 - wasmtime-c-api: Make `wasm_table_set` *not* take ownership of its reference</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/examples/externref.c#89603bc6</link>
        <description>wasmtime-c-api: Make `wasm_table_set` *not* take ownership of its referenceSame for `wasm_table_grow` and `wasm_table_new` and their `init` values.

            List of files:
            /wasmtime-44.0.1/examples/externref.c</description>
        <pubDate>Fri, 10 Jul 2020 19:03:03 +0000</pubDate>
        <dc:creator>Nick Fitzgerald &lt;fitzgen@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>b73b2e0d - wasmtime-c-api: Make `wasmtime_externref_new` write to an out pointer</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/examples/externref.c#b73b2e0d</link>
        <description>wasmtime-c-api: Make `wasmtime_externref_new` write to an out pointerThe C API prefers not to return structs by value.Same for `wasmtime_externref_new_with_finalizer`.

            List of files:
            /wasmtime-44.0.1/examples/externref.c</description>
        <pubDate>Fri, 10 Jul 2020 18:21:31 +0000</pubDate>
        <dc:creator>Nick Fitzgerald &lt;fitzgen@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>4a349ee2 - wasmtime: Add `externref` Rust example</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/examples/externref.c#4a349ee2</link>
        <description>wasmtime: Add `externref` Rust example

            List of files:
            /wasmtime-44.0.1/examples/externref.c</description>
        <pubDate>Wed, 08 Jul 2020 22:27:01 +0000</pubDate>
        <dc:creator>Nick Fitzgerald &lt;fitzgen@gmail.com&gt;</dc:creator>
    </item>
<item>
        <title>5ed8a9ba - wasmtime-c-api: Add an `externref`s example for the C API</title>
        <link>http://172.16.0.5:8080/history/wasmtime-44.0.1/examples/externref.c#5ed8a9ba</link>
        <description>wasmtime-c-api: Add an `externref`s example for the C API

            List of files:
            /wasmtime-44.0.1/examples/externref.c</description>
        <pubDate>Wed, 08 Jul 2020 21:33:36 +0000</pubDate>
        <dc:creator>Nick Fitzgerald &lt;fitzgen@gmail.com&gt;</dc:creator>
    </item>
</channel>
</rss>
