MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / encode_module

Function encode_module

crates/fuzzing/src/single_module_fuzzer.rs:217–225  ·  view source on GitHub ↗
(module: &[u8], fuzz_data: &[u8])

Source from the content-addressed store, hash-verified

215}
216
217fn encode_module(module: &[u8], fuzz_data: &[u8]) -> Vec<u8> {
218 let mut module = module.to_vec();
219 wasm_encoder::CustomSection {
220 name: SECTION_NAME.into(),
221 data: Cow::Borrowed(&fuzz_data),
222 }
223 .append_to(&mut module);
224 module
225}
226
227struct FuzzInput<'a> {
228 /// The module extracted from the input, without the fuzz input custom

Callers 2

executeFunction · 0.85
mutateFunction · 0.85

Calls 2

to_vecMethod · 0.45
append_toMethod · 0.45

Tested by

no test coverage detected