Stream: git-wasmtime

Topic: wasmtime / PR #11885 Add a new `ResourceDynamic` type


view this post on Zulip Wasmtime GitHub notifications bot (Oct 19 2025 at 04:43):

alexcrichton opened PR #11885 from alexcrichton:refactor-resources to bytecodealliance:main:

This commit adds a new type wasmtime::component::ResourceDynamic to
the embedding API which internally is more-or-less the same as
Resource<T> but with different type information. This
ResourceDynamic specifically enables storing runtime information for
managing the type of the resource as opposed to Resource<T> which
requires static information.

The main goal of this type is to enable exposing resources in the C API
of Wasmtime. Currently there is no way to define different resource
types in the C API because the only option is Resource<T>. With this
type it will be possible to create distinct resource types in the C API
for embedders to use.

cc https://github.com/bytecodealliance/wasmtime/issues/11437

view this post on Zulip Wasmtime GitHub notifications bot (Oct 19 2025 at 04:43):

alexcrichton requested dicej for a review on PR #11885.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 19 2025 at 04:43):

alexcrichton requested wasmtime-core-reviewers for a review on PR #11885.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 19 2025 at 04:44):

alexcrichton commented on PR #11885:

I'll note that to achieve this I felt it necessary to do some refactoring first. I've split up all of the refactorings as separate commits so this is likely easiest to look at commit-by-commit rather than all-at-once.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 20 2025 at 17:05):

dicej submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 20 2025 at 17:05):

dicej created PR review comment:

//! inside of a store. The `ResourceAny::resource_drop` method, or a conversion

view this post on Zulip Wasmtime GitHub notifications bot (Oct 20 2025 at 17:05):

dicej created PR review comment:

// crate failed to compile with obscure errors. At least this is an internal

view this post on Zulip Wasmtime GitHub notifications bot (Oct 20 2025 at 17:08):

alexcrichton updated PR #11885.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 20 2025 at 17:08):

alexcrichton has enabled auto merge for PR #11885.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 20 2025 at 17:46):

alexcrichton merged PR #11885.


Last updated: Dec 06 2025 at 06:05 UTC