Skip to content

wasmlink: can generate function names that clash #2

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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