Skip to content

Conversation

@alexcrichton
Copy link
Member

This updates various runtimes bits for components to use OptionsIndex more aggressively and ultimately deletes the old Options type. The Options type is a heavyweight package of all possible options which is effectively a duplication of what OptionsIndex points to, so that's removed in favor of directly accessing options.

This updates various runtimes bits for components to use `OptionsIndex`
more aggressively and ultimately deletes the old `Options` type. The
`Options` type is a heavyweight package of all possible options which is
effectively a duplication of what `OptionsIndex` points to, so that's
removed in favor of directly accessing options.
@alexcrichton alexcrichton requested a review from dicej November 5, 2025 19:22
@alexcrichton alexcrichton requested a review from a team as a code owner November 5, 2025 19:22
}

async fn write<D: 'static, P: Send + 'static, T: func::Lower + 'static, B: WriteBuffer<T>>(
instance: Option<Instance>,
Copy link
Member Author

Choose a reason for hiding this comment

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

@dicej your scrutiny here would be appreciated. I'm relatively sure this removal is "accurate", but I'm not sure if it should cascade in more removals as well (e.g. instance => _instance above as opposed to removing it entirely)

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks reasonable to me, and I would indeed cascade the removals. No point in passing unused parameters around.

@github-actions github-actions bot added the wasmtime:api Related to the API of the `wasmtime` crate itself label Nov 5, 2025
}

async fn write<D: 'static, P: Send + 'static, T: func::Lower + 'static, B: WriteBuffer<T>>(
instance: Option<Instance>,
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks reasonable to me, and I would indeed cascade the removals. No point in passing unused parameters around.

alexcrichton added a commit to alexcrichton/wasmtime that referenced this pull request Nov 10, 2025
Some follow-up work to delete more unnecessary parameter-passing.
@alexcrichton
Copy link
Member Author

Oops I accidentally landed this in #11987 without intending to... Given that I'll close this, and the follow-up work is at #12013

@alexcrichton alexcrichton deleted the less-options-passing branch November 10, 2025 18:24
github-merge-queue bot pushed a commit that referenced this pull request Nov 10, 2025
Some follow-up work to delete more unnecessary parameter-passing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wasmtime:api Related to the API of the `wasmtime` crate itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants