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

Unified packages in this organization

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.

Package Role
swift-color-standard Unified color representation across CSS / display profiles
swift-css-standard CSS specification — selectors, properties, values
swift-darwin-standard Darwin platform specification surface
swift-domain-standard Domain name representation (per RFC 1035 et seq.)
swift-email-standard Email message format
swift-emailaddress-standard Email address (RFC 5322)
swift-epub-standard EPUB publication format
swift-html-standard HTML — unified across W3C historical and WHATWG living standard
swift-ipv4-standard IPv4 address
swift-ipv6-standard IPv6 address
swift-json-feed-standard JSON Feed specification
swift-locale-standard Locale identifier (BCP 47, ISO 639/3166)
swift-pdf-standard PDF specification (ISO 32000)
swift-postgresql-standard PostgreSQL wire/SQL specification
swift-rss-standard RSS specification
swift-sockets-standard Sockets specification
swift-svg-standard SVG specification
swift-time-standard Time representation (ISO 8601 et seq.)
swift-uri-standard URI Generic Syntax (RFC 3986)

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.

Status

Public alpha. Composition packages are under active development; per-authority organizations are live and filling out.

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 1

  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 21 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…