Skip to content

Add documentation catalog #118

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

Merged
merged 3 commits into from
May 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .spi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: 1
builder:
configs:
- documentation_targets:
- EmbeddedSwift
24 changes: 24 additions & 0 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// swift-tools-version: 6.0

import PackageDescription

let package = Package(
name: "swift-embedded-examples",
products: [
.library(name: "EmbeddedSwift", targets: ["EmbeddedSwift"])
],
dependencies: [
.package(
url: "https://github.com/swiftlang/swift-docc-plugin", from: "1.1.0")
],
targets: [
.target(name: "EmbeddedSwift")
])
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Integrate with Bazel

🚧 Under construction...
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Integrate with CMake

🚧 Under construction...
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Integrate with Make

🚧 Under construction...
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Integrate with SwiftPM

🚧 Under construction...
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Integrate with Xcode

🚧 Under construction...

> Warning: Embedded Swift integration with Xcode is still under development and
> subject to change.
77 changes: 77 additions & 0 deletions Sources/EmbeddedSwift/Documentation.docc/Development/Status.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Status

**⚠️ Embedded Swift is experimental. This document might be out of date with latest development.**

**‼️ Use the latest downloadable 'Trunk Development' snapshot from swift.org to use Embedded Swift. Public releases of Swift do not yet support Embedded Swift.**

For an introduction and motivation into Embedded Swift, please see "[A Vision for Embedded Swift](https://github.com/swiftlang/swift-evolution/blob/main/visions/embedded-swift.md)", a Swift Evolution document highlighting the main goals and approaches.

## Embedded Swift Language Features

| **Language Feature** | **Currently Supported In Embedded Swift** |
|-------------------------------------------------------|------------------------------------------------------------------------------------|
| *Anything not listed below* | Yes |
| Library Evolution (resilience) | No, intentionally unsupported long-term |
| Objective-C interoperability | No, intentionally unsupported long-term |
| Non-WMO builds | No, intentionally unsupported long-term (WMO should be used) |
| Existentials (values of protocol types) | Only class-bound existentials (for protocols derived from AnyObject) are supported |
| Any | No, currently disallowed |
| AnyObject | Yes |
| Metatypes | No, currently only allowed as unused arguments (type hints) |
| Untyped throwing | No, intentionally unsupported long-term (typed throwing should be used instead) |
| Weak references, unowned references | No |
| Non-final generic class methods | No, intentionally unsupported long-term, see <[Embedded Swift -- Non-final generic methods](NonFinalGenericMethods.md)>|
| Parameter packs (variadic generics) | No, not yet supported |

## Embedded Standard Library Breakdown

This status table describes which of the following standard library features can be used in Embedded Swift:

| **Swift Standard Library Feature** | **Currently Supported In Embedded Swift?** |
|------------------------------------------------------------|-----------------------------------------------------|
| Array (dynamic heap-allocated container) | Yes |
| Array slices | Yes |
| assert, precondition, fatalError | Partial, only StaticStrings can be used as a failure message |
| Bool, Integer types, Float types | Yes |
| Codable, Encodable, Decodable | No |
| Collection + related protocols | Yes |
| Collection algorithms (sort, reverse) | Yes |
| CustomStringConvertible, CustomDebugStringConvertible | Yes, except those that require reflection (e.g. Array's .description) |
| Dictionary (dynamic heap-allocated container) | Yes |
| Floating-point conversion to string | No |
| Floating-point parsing | No |
| FixedWidthInteger + related protocols | Yes |
| Hashable, Equatable, Comparable protocols | Yes |
| InputStream, OutputStream | No |
| Integer conversion to string | Yes |
| Integer parsing | Yes |
| KeyPaths | Partial (only compile-time constant key paths to stored properties supported, only usable in MemoryLayout and UnsafePointer APIs) |
| Lazy collections | Yes |
| ManagedBuffer | Yes |
| Mirror (runtime reflection) | No, intentionally unsupported long-term |
| Objective-C bridging | No, intentionally unsupported long-term |
| Optional | Yes |
| print / debugPrint | Partial (only String, string interpolation, StaticStrings, integers, pointers and booleans, and custom types that are CustomStringConvertible) |
| Range, ClosedRange, Stride | Yes |
| Result | Yes |
| Set (dynamic heap-allocated container) | Yes |
| SIMD types | Yes |
| StaticString | Yes |
| String (dynamic) | Yes |
| String interpolations | Partial (only strings, integers, booleans, and custom types that are CustomStringConvertible can be interpolated) |
| Unicode | Yes |
| Unsafe\[Mutable\]\[Raw\]\[Buffer\]Pointer | Yes |
| VarArgs | No |

## Non-stdlib Features

This status table describes which of the following Swift features can be used in Embedded Swift:

| **Swift Feature** | **Currently Supported In Embedded Swift?** |
|------------------------------------------------------------|-----------------------------------------------------|
| Synchronization module | Partial (only Atomic types, no Mutex) |
| Swift Concurrency | Partial, experimental (basics of actors and tasks work in single-threaded concurrency mode) |
| C interop | Yes |
| C++ interop | Yes |
| ObjC interop | No, intentionally unsupported long-term |
| Library Evolution | No, intentionally unsupported long-term |
Loading
Loading