A host of utilities to make Swift Swiftier
Find a file
2025-11-02 09:37:42 -05:00
.swiftpm okay, too many changes apparently 2025-09-19 18:21:35 -04:00
.vscode test: update tests 2025-05-17 16:09:50 -04:00
Sources deprecate Bool.init(fromInt:) and Bool.asInt in favor of labelless initializers on their respective types 2025-11-02 09:37:21 -05:00
Tests deprecate Bool.init(fromInt:) and Bool.asInt in favor of labelless initializers on their respective types 2025-11-02 09:37:21 -05:00
.gitignore chore: 📄 switch license to GNU Affero GPL 2025-04-12 19:30:15 -04:00
.spi.yml chore: 📄 switch license to GNU Affero GPL 2025-04-12 19:30:15 -04:00
.swift-version okay, too many changes apparently 2025-09-19 18:21:35 -04:00
.swiftlint.yml chore(lint): 🔧 remove invalid rule in swiftlint config 2025-04-13 10:07:28 -04:00
Changelog.md deprecate Bool.init(fromInt:) and Bool.asInt in favor of labelless initializers on their respective types 2025-11-02 09:37:21 -05:00
Code of Conduct.md docs: documentation tweaks 2025-04-13 11:09:50 -04:00
License.md simplify license headers 2025-08-20 15:15:30 -04:00
Package.swift remove dependency on swift-docc-plugin 2025-11-02 09:37:42 -05:00
Readme.md okay, too many changes apparently 2025-09-19 18:21:35 -04:00

Rapid

swift compatibility platform compatibility

A host of utilities to make Swift Swiftier.

What's this about?

Rapid is a package containing many of the most common extensions to the standard library (and, occasionally, other frameworks).

Within Rapid, you will find:

  • Operators for the most commonly used features, such as § to create String representations
  • Unicode versions of built-in operators, such as instead of !=
  • Property wrappers, such as @Transformed or @Clamped
  • Global constants for commonly used values, such as π for Double.pi
  • Computed properties to simplify common comparisons, such as isNil or isNotEmpty
  • Syntactic sugar for working on specific values, such as configure(_:_:) or run(with:do:)
  • Methods and subscripts that return nil instead of crashing when invalid arguments are passed
  • And more...

Using Rapid

Using in a Swift package

  1. Add Rapid to your package manifest:

    .package(
      url: "https://codeberg.org/kaascevich/Rapid.git",
      from: "4.0.0"
    )
    
  2. Add Rapid as a dependency for each of your targets:

    .product(
      name: "Rapid",
      package: "Rapid"
    )
    

Using in an Xcode project

  1. Choose FileAdd Package Dependencies...
  2. Copy this link, and paste it into the search bar.
  3. Click Add Package.
  4. Choose the target you want to add Rapid to, and then click Add Package again.

Documentation

I've documented everything to the best of my ability. However, due to an issue with the Swift Package Index, you'll need to build it yourself for now. Dunno when they fixed it, but they did! You can find it here.