The reason why the linking is not supported on Wasm is we cannot rename entrypoint symbol by linker (wasm-ld): Stop renaming main symbol for WASI apple/swift-package-manager#3804 On other platforms, SwiftPM build .executableTarget targets with renaming main to {moduleName}_main to avoid conflicting with .testTarget's entrypoint at link-time. For non-testing build, SwiftPM renames the entrypoint back to main by linker option. However, wasm-ld doesn't have the option for now, so we disable the feature now.