Skip to content

wasmlink: can generate function names that clash #2

@srenatus

Description

@srenatus

When calling wasmlink -n opa caller.wasm policy.wasm, and policy.wasm contains both a function named opa_eval and a function named eval, the latter is prefixed with opa in AddPrefixToName can causes a clash when trying to render the combined module:

policy.wasm:000018a: error: redefinition of function "$opa_eval"

However, the workaround is to rename the module, and avoid that. So instead, if we do wasmlink -n policy caller.wasm policy.wasm -o out.wasm and import stuff from policy instead of from opa, the combining succeeds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions