Skip to content
@swift-standards

Swift Standards

Swift implementations of international standards — Layer 2 of the Swift Institute ecosystem.

Swift Standards

Swift implementations of international standards and protocols — Layer 2 of the Swift Institute ecosystem.

What this is

Authoritative specifications — RFCs, ISO standards, W3C and WHATWG specs — modeled directly in Swift's type system, so parsing, validation, and formatting are enforced by the compiler rather than checked at runtime. Each specification lives in its own package, defines its own namespace (RFC_5322, ISO_32000), and follows its source document as literally as possible.

The authorities

Each standards authority has its own GitHub organization hosting the specifications it governs:

Organization Covers
swift-ietf IETF RFCs — URI, IP, email, sockets, UUID
swift-iso ISO — PDF, EPUB, date and time, locale
swift-w3c W3C — CSS, SVG
swift-whatwg WHATWG — HTML, the URL Living Standard
swift-ieee · swift-iec · swift-ecma · swift-incits · swift-arm-ltd · swift-intel · swift-microsoft · swift-riscv (pending) Single-package organizations

Browse the packages

Where several specifications govern the same subject, a swift-*-standard package here composes them into one canonical Swift representation. swift-standards itself extends the Swift standard library with the functionality every specification package builds on.

Use GitHub's native repository view to browse the current package set and each repository's description, or start with the native repositories matching swift- and repositories matching standard filters. The view can be narrowed further with GitHub's repository search. The per-authority organizations above remain the source for specification-specific packages.

How to use a package

Each package is a separate Swift Package Manager package with its own repository — there is no umbrella install:

dependencies: [
    .package(url: "https://github.com/swift-standards/swift-uri-standard.git", from: "0.1.0")
]

The per-authority organizations follow the same one-repo-per-package convention. See each package's README for current version and Swift requirements.

Maintained by Coen ten Thije Boonkkamp — contributions welcome via pull request.

License

All packages use the Apache License 2.0.

Pinned Loading

  1. swift-pdf-standard swift-pdf-standard Public

    PDF meta-package composing ISO 32000 with Flate compression support for Swift.

    Swift

  2. swift-html-standard swift-html-standard Public

    Unified wrapper over the WHATWG HTML Living Standard, with complete, attributes-only, and elements-only products, for Swift.

    Swift

  3. swift-email-standard swift-email-standard Public

    RFC 2045, 2046, and 5322 email message construction with MIME multipart support for Swift.

    Swift 2

  4. swift-emailaddress-standard swift-emailaddress-standard Public

    RFC 5321, 5322, and 6531 email address validation and parsing for Swift.

    Swift 1

  5. swift-time-standard swift-time-standard Public

    Unified Time type composing ISO 8601, RFC 3339, and RFC 5322 for Swift.

    Swift

  6. swift-svg-standard swift-svg-standard Public

    Canonical re-export of the W3C SVG 2 implementation for Swift.

    Swift

Repositories

Showing 10 of 31 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…