I modified an existing wasm module added new functions to it after emitting the wasm module. when i parse the wasm module again the function id changed how do i maintain same function id after emitting the wasm module
// Call instrument_exit, passing the original function's ID as an argument
instrumented_function
.func_body()
.i32_const(function.id().index() as i32)
.call(instrument_exit_function_id);
also the order of the function changed after emitting changes the id of the functions but i want id to same.
Summary
I modified an existing wasm module added new functions to it after emitting the wasm module. when i parse the wasm module again the function id changed how do i maintain same function id after emitting the wasm module
// Call instrument_exit, passing the original function's ID as an argument instrumented_function .func_body() .i32_const(function.id().index() as i32) .call(instrument_exit_function_id);
also the order of the function changed after emitting changes the id of the functions but i want id to same.