<?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 anyref.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/anyref.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/anyref.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/anyref.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/anyref.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/anyref.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/anyref.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>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/anyref.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/anyref.c</description>
        <pubDate>Sat, 13 Apr 2024 18:17:03 +0000</pubDate>
        <dc:creator>Nick Fitzgerald &lt;fitzgen@gmail.com&gt;</dc:creator>
    </item>
</channel>
</rss>
