Skip to content

[BridgeJS] wasm-ld: error: import module mismatch for symbol #657

@sliemeobn

Description

@sliemeobn

The @_extern symbols generated by BridgeJS are subject to the same behavior like these: #628 #631

swift issue: swiftlang/swift#87320

That means currently BridgeJS cannot be used in libraries, because linking the final wasm binary (especially in embedded) will cause errors like this one.

wasm-ld: error: import module mismatch for symbol: $e14BrowserInterop36bjs_JSWindow_getComputedStyle_extern33_A850048D7CA460B221AE34673489EEABLLys5Int32VAE_AEtF
>>> defined as env in /Users/simon/dev/elementary-swift/elementary-ui/Examples/Basic/.build/wasm32-unknown-wasip1/release/App.build/AnimationsView.swift.o
>>> defined as BrowserInterop in /Users/simon/dev/elementary-swift/elementary-ui/Examples/Basic/.build/wasm32-unknown-wasip1/release/BrowserInterop.build/BridgeJS.swift.o

wasm-ld: error: import module mismatch for symbol: $e14BrowserInterop28bjs_JSPerformance_now_extern33_A850048D7CA460B221AE34673489EEABLLySds5Int32VF
>>> defined as env in /Users/simon/dev/elementary-swift/elementary-ui/Examples/Basic/.build/wasm32-unknown-wasip1/release/App.build/AnimationsView.swift.o
>>> defined as BrowserInterop in /Users/simon/dev/elementary-swift/elementary-ui/Examples/Basic/.build/wasm32-unknown-wasip1/release/BrowserInterop.build/BridgeJS.swift.o

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions