Skip to content

Documentation support#40

Merged
shahmishal merged 4 commits into
swiftlang:mainfrom
swift-android-sdk:docs
May 6, 2026
Merged

Documentation support#40
shahmishal merged 4 commits into
swiftlang:mainfrom
swift-android-sdk:docs

Conversation

@marcprux

Copy link
Copy Markdown
Contributor

This PR adds support for documenting Swift on Android.

It follows the pattern of Swift embedded, whose documentation source at:
https://github.com/swiftlang/swift-embedded-examples/tree/main/Sources/EmbeddedSwift/Documentation.docc
is published to:
https://docs.swift.org/embedded/documentation/embedded/

Instructions for building and previewing the documentation locally are in the README.md.

@marcprux marcprux requested review from Joannis and finagolfin April 23, 2026 03:26

@Joannis Joannis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great start. Thanks for kicking off this PR

@marcprux marcprux requested a review from shahmishal April 23, 2026 21:14
Swift on Android uses cross-compilation: you build on a macOS or Linux host, and the compiler produces native ARM or x86_64 binaries targeting Android.

```shell
$ swift build --swift-sdk aarch64-unknown-linux-android28

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope to get this changed to --swift-sdk swift-6.3.2-RELEASE_android --triple aarch64-unknown-linux-android28 soon.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that WIP somewhere? That would be a great improvement, and will be relevant for all the SDKs going forward.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's in trunk now, 😄 trying to get it into 6.3 here, swiftlang/swift-package-manager#9998.


## Overview

Swift on Android uses cross-compilation: you build on a macOS or Linux host, and the compiler produces native ARM or x86_64 binaries targeting Android.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or Windows

|---|---|
| ARM64 | `aarch64-unknown-linux-android28` |
| ARM32 | `armv7-unknown-linux-androideabi28` |
| x86_64 | `x86_64-unknown-linux-android28` |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

32bit x86 is also supported in the Android SDK bundled with the Windows installer

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None of us use that SDK, which doesn't even have any install instructions yet. I have asked those behind it to write some up.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

32bit x86 Android is almost completely non-existent. I think we should avoid any mention of it, even if the Windows SDK happens to still support it.

@shahmishal shahmishal merged commit 55aadd2 into swiftlang:main May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants