capstonene
capstonene

Reputation: 179

can we import a wasm module in another wasm module?

in https://developer.mozilla.org/en-US/docs/WebAssembly/Understanding_the_text_format#importing_functions_from_javascript explains that we can import javascript functions in wasm. how can we import wasm functions in another wasm? i mean imagine i have two wasm modules : A and B. i want call a function in module A in module B. so i need to import it. how can i do this?

Upvotes: 5

Views: 2479

Answers (1)

jonathanberi
jonathanberi

Reputation: 1947

While this is not possible today, it is currently being worked in via a proposal known as Module Linking (see the explainer for more background.) At the time of this posting, this feature is in the early proposal phase, in part because it is dependant on a few other features to land first.

Upvotes: 8

Related Questions