Skip to content

Cannot link shared libaries which import thread.new-indirect #2583

Closed

Description

@alexcrichton

Given this foo.wit:

package a:b;

world hi {
  export hi: func();
}

and this foo.wat

(module
  (import "$root" "[thread-new-indirect-v0]" (func (param i32 i32) (result i32)))

  (func (export "hi"))
)

this yields:

$ wasm-tools component link <(wasm-tools component embed foo.wit foo.wat)
error: failed to encode a component from modules

Caused by:
    0: table __indirect_function_table must be an exported funcref table for thread.new-indirect

cc @dicej, would you be up for taking this?

Activity

  1. self-assigned this
    on Jul 29, 2026
  2. added a commit that references this issue on Aug 5, 2026
    6adf3df
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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