(module ;; Use the same internal name as in first, so $other.foo will need to be ;; deduplicated. (import "first" "foo" (func $other.foo)) ;; Use a different prefix than in first ($main instead of $other). (import "first" "bar" (func $main.bar)) (memory $second.mem 2) (export "mem" (memory $second.mem)) (func $second.foo (export "foo") (call $other.foo) (drop (i32.const 3) ) ) ;; Use the same internal name as in first, so this will need to be ;; deduplicated. (func $bar (export "bar") (call $main.bar) (drop (i32.const 4) ) ) )