Skip to content

Enable gc feature by default#12805

Open
tolumide-ng wants to merge 1 commit intobytecodealliance:mainfrom
tolumide-ng:fix/wasmtime-c-api-gc-update
Open

Enable gc feature by default#12805
tolumide-ng wants to merge 1 commit intobytecodealliance:mainfrom
tolumide-ng:fix/wasmtime-c-api-gc-update

Conversation

@tolumide-ng
Copy link

The c-api crate currently enables the gc feature on its wasmtime dependency, even though it exposes a gc feature to control this behaviour. This prevents downstream users from disabling gc, since Cargo.toml doesn't allow overriding it. However, structs like RootScope are only available when gc is enabled. Removing it from default features, without other options, would break internal implementations.

Changes

  1. Enable the gc feature via the wasmtime-c-api crate by default.
  2. Removes the explicitly set gc feature for the wasmtime dependency in c-api, thus enabling downstream users to specify this behaviour.

Closes #12783

@tolumide-ng tolumide-ng requested a review from a team as a code owner March 19, 2026 22:51
@tolumide-ng tolumide-ng requested review from cfallin and removed request for a team March 19, 2026 22:51
@github-actions github-actions bot added the wasmtime:c-api Issues pertaining to the C API. label Mar 20, 2026

[features]
# WASMTIME_FEATURE_LIST
default = ["gc"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh for this the default feature lives here instead which includes gc, so I think it's reasonable to just from [dependencies]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wasmtime:c-api Issues pertaining to the C API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

c-api: gc feature unconditionally enabled in wasmtime crate

2 participants