Skip to content

Handle OOM in wasmtime_environ::types::WasmFuncType's serde support#12672

Merged
alexcrichton merged 2 commits intobytecodealliance:mainfrom
fitzgen:handle-oom-in-wasm-func-type-serde-support
Feb 25, 2026
Merged

Handle OOM in wasmtime_environ::types::WasmFuncType's serde support#12672
alexcrichton merged 2 commits intobytecodealliance:mainfrom
fitzgen:handle-oom-in-wasm-func-type-serde-support

Conversation

@fitzgen
Copy link
Member

@fitzgen fitzgen commented Feb 25, 2026

Depends on #12670

@fitzgen fitzgen requested review from a team as code owners February 25, 2026 21:58
@fitzgen fitzgen requested review from alexcrichton and removed request for a team February 25, 2026 21:58
}
}

impl<'de> serde::Deserialize<'de> for WasmFuncType {
Copy link
Member

Choose a reason for hiding this comment

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

Since this is pretty gnarly, could #[serde(deserialize_with)] be used instead on the params_results field? That would delegate to a custom function that would deserialize into a fallible Vec which would then fallibly be converted to Box<[T]>.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh nice, I didn't know that was there

@fitzgen fitzgen force-pushed the handle-oom-in-wasm-func-type-serde-support branch from 064e1eb to adf5070 Compare February 25, 2026 22:26
@alexcrichton alexcrichton added this pull request to the merge queue Feb 25, 2026
Merged via the queue into bytecodealliance:main with commit c78f891 Feb 25, 2026
45 checks passed
@fitzgen fitzgen deleted the handle-oom-in-wasm-func-type-serde-support branch February 25, 2026 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants