PackageToJS: Derive WASI and shared memory support from wasm imports - #807
Draft
kateinoigakukun wants to merge 2 commits into
Draft
PackageToJS: Derive WASI and shared memory support from wasm imports#807kateinoigakukun wants to merge 2 commits into
kateinoigakukun wants to merge 2 commits into
Conversation
Closed
The SwiftBuild backend's build directory doesn't encode the target triple, so detect the traits derived from it by parsing the imports of the product binary instead. The imports are now parsed as a part of the packaging build graph.
kateinoigakukun
force-pushed
the
yt/rework-swiftbuild-support
branch
from
August 18, 2026 12:24
3f6620f to
9b9828e
Compare
```
$ echo "@preconcurrency import var Foundation.stderr" | swiftly run +main-snapshot-2026-08-11 swiftc - -o /dev/null
<stdin>:1:28: error: ambiguous name 'stderr' in module 'Foundation'
1 | @preconcurrency import var Foundation.stderr
| `- error: ambiguous name 'stderr' in module 'Foundation'
2 |
Glibc.stderr:1:32: note: found this candidate
1 | nonisolated(unsafe) public var stderr: UnsafeMutablePointer<FILE>! { get }
| `- note: found this candidate
/usr/include/stdio.h:151:14: note: found this candidate
149 | extern FILE *stdin; /* Standard input stream. */
150 | extern FILE *stdout; /* Standard output stream. */
151 | extern FILE *stderr; /* Standard error output stream. */
| `- note: found this candidate
152 | /* C89/C99 say they're macros. Make them happy. */
153 | #define stdin stdin
```
swiftlang/swift#89891
kateinoigakukun
force-pushed
the
yt/rework-swiftbuild-support
branch
from
August 18, 2026 13:10
0a9d143 to
9544834
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The SwiftBuild backend's build directory doesn't encode the target triple, so detect the traits derived from it by parsing the imports of the product binary instead. The imports are now parsed as a part of the packaging build graph.