Skip to content

Function Id or index changes after emittimg the wasm module #254

@pavanmikkilineni

Description

@pavanmikkilineni

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions