Skip to content

Commit c343d60

Browse files
committed
Write install swift documentation
Adds an initial document on how to install a toolchain that supports Embedded Swift.
1 parent 32ed7ec commit c343d60

File tree

3 files changed

+33
-11
lines changed

3 files changed

+33
-11
lines changed

README.md

+2-9
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,13 @@ This repository is a set of demonstration projects of **Embedded Swift**. Embedd
88
- [Embedded Swift Vision Document](https://github.com/apple/swift-evolution/blob/main/visions/embedded-swift.md)
99
- [Documentation for Embedded Swift](https://github.com/apple/swift/tree/main/docs/EmbeddedSwift)
1010

11-
> [!WARNING]
12-
> Embedded Swift is experimental. Some information on this page might be out of date with latest development.
13-
1411
## Building the examples
1512

1613
Each example in this repository contains build and deployment instructions, however there are a couple common steps needed for many of the examples included below:
1714

18-
1. Install the latest downloadable 'main' [Development Snapshot](https://www.swift.org/install/macos/#development-snapshots) from swift.org to use Embedded Swift. Public releases of Swift do not yet support Embedded Swift.
19-
20-
You can follow the [tutorial here](https://apple.github.io/swift-matter-examples/tutorials/swiftmatterexamples/setup-macos/) for instructions on installing and using nighly Swift toolchains.
21-
22-
2. Install [`uv`](https://github.com/astral-sh/uv) "an extremely fast Python package and project manager".
15+
1. Install [`swift`](https://swift.org) using the [instructions here](https://swiftpackageindex.com/apple/swift-embedded-examples/main/documentation/embeddedswift/installembeddedswift).
2316

24-
You can follow the [instructions here](https://docs.astral.sh/uv/getting-started/installation/) to install `uv`.
17+
2. Install [`uv`](https://github.com/astral-sh/uv), "an extremely fast Python package and project manager", using the [instructions here](https://docs.astral.sh/uv/getting-started/installation/).
2518

2619
## Catalog of Examples
2720

Sources/EmbeddedSwift/Documentation.docc/Documentation.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# ``EmbeddedSwift``
22

3-
<!--@START_MENU_TOKEN@-->Summary<!--@END_MENU_TOKEN@-->
3+
@Metadata {
4+
@DisplayName("Embedded Swift")
5+
}
46

57
## Overview
68

Original file line numberDiff line numberDiff line change
@@ -1,3 +1,30 @@
11
# Install Embedded Swift
22

3-
🚧 Under construction...
3+
Get the tools needed to use Embedded Swift.
4+
5+
## Overview
6+
7+
Embedded Swift is an experimental and rapidly developing feature of the Swift language, as such it is only available in "Development Snapshot".
8+
9+
The best way to install Swift is using [`swiftly`](http://github.com/swiftlang/swiftly), the official Swift toolchain installer and manager. For instructions on how to install `swiftly`, check out the [Getting Started](https://www.swift.org/swiftly/documentation/swiftly/getting-started) guide.
10+
11+
> Note: Swiftly installs the latest release toolchain during `swiftly init`, if you only plan on using Embedded Swift, you can avoid downloading this toolchain by using the `swiftly init --skip-install` option.
12+
13+
After installing Swiftly, install the latest main "Development Snapshot" toolchain available for your platform by running:
14+
15+
```shell
16+
$ swiftly install main-snapshot
17+
...
18+
main-snapshot-2025-04-12 installed successfully!
19+
```
20+
21+
To test that you have Swift installed, run `swift --version` from your shell or terminal app. It should say "6.2-dev", meaning you have a "Development Snapshot" toolchain.
22+
23+
```shell
24+
$ swift --version
25+
Apple Swift version 6.2-dev (LLVM 81ab6d9f7e4810f, Swift 9cc1947527bacea)
26+
Target: arm64-apple-macosx15.0
27+
Build config: +assertions
28+
```
29+
30+
> Warning: When using other shells, like one integrated into an IDE, be careful to verify that the version of Swift reported matches that of the shell you used to install Swift.

0 commit comments

Comments
 (0)