Skip to content

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

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?

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