-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add WebAssembly SDK recipe and make-wasm-sdk
subcommand
#74
Add WebAssembly SDK recipe and make-wasm-sdk
subcommand
#74
Conversation
5ad5676
to
85d3fd6
Compare
…#75) Generalized `--{host,target}-swift-package-path` options to be common generator options based on PR feedback #74 (comment)
@swift-ci test |
a7e3c24
to
c2f764c
Compare
@swift-ci test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I realize this is hard to test without downloading the actual dependencies on CI. Eventually we should have a way to pass a virtual file system to the generator engine for testing purposes. But for that we need to resolve #76 first.
I think it would be worth considering standalone stdlib build support in the generator to avoid such external dependencies in CI :) |
Can you elaborate on what it would mean in this context? |
I mean if we can build stdlib on sdk-generator CI, we don't need to download stdlib artifacts from third party swiftwasm releases. |
Yes, that's true. But ideally stdlib builds would be tested in the main Swift repository. Here we only need to verify that files are moved to correct locations, I hope that can be done with a virtual in-memory file system without requiring actual content to be present. |
This patch introduces an experimental WebAssembly SDK recipe and `make-wasm-sdk` subcommand. The make command takes host Swift toolchain package, target Swift stdlib (`lib/swift{,_static}`), and WASI sysroot like follows: ```console swift run swift-sdk-generator make-wasm-sdk \ --target wasm32-unknown-wasi \ --host-swift-package-path Downloads/swift-DEVELOPMENT-SNAPSHOT-2024-01-12-a \ --target-swift-package-path Downloads/swift-wasm-DEVELOPMENT-SNAPSHOT-2024-01-12-a \ --wasi-sysroot Downloads/wasi-sysroot ```
The directory was missed to be taken from target toolchain but it wasn't revealed on local testing since the host toolchain unintentionally contained the directory.
eb7237b
to
28c2d46
Compare
@swift-ci Please test |
@swift-ci test |
This patch introduces an experimental WebAssembly SDK recipe and
make-wasm-sdk
subcommand. The make command takes host Swift toolchain package, target Swift stdlib (lib/swift{,_static}
), and WASI sysroot like follows: