swift-blocks

0.7.0

🧱 swift-blocks: A collection of my dependency-free Swift building blocks.
dirtyhenry/swift-blocks

What's New

0.7.0

2025-04-28T10:59:30Z

Minor Changes

  • 17c901b: Iterate on CLIUtils.shell command.

    ⚠️ The signature now throws:

    -static func shell(_ command: String) -> String
    +static func shell(_ command: String) throws -> String

Patch Changes

  • 995be85: Stop escaping slashes on JSON functions.

    Output examples:

    -foo\/bar
    +foo/bar

swift-blocks logo

🧱 Blocks

Build Blocks Swift versions compatibility badge Platforms compatibility badge

A collection of my Swift building blocks.

This repository contains:

  • Blocks: a dependency-free Swift package with some utilities to deal with networking, API management, web protocols, etc.;

And the following examples executables/apps:

  • BlocksCLI: a command-line interface for basic proof-of-concepts;
  • BlocksApp: a basic App with no other dependencies than Blocks and Apple-provided 1st-party frameworks.

Tip

🏘️ For a similar package that builds on a curated set of dependencies (such as TCA, Yams, or Swift Argument Parser), watch out my Hoods package.

Usage

import Blocks

Installation

Swift Package Manager is recommended:

dependencies: [
    .package(
        url: "https://github.com/dirtyhenry/swift-blocks",
        from: "0.7.0"
    ),
]

Next, add Blocks as a dependency of your test target:

targets: [
    .target(name: "MyTarget", dependencies: [
        .product(name: "Blocks", package: "swift-blocks")
    ])
]

License

MIT

Description

  • Swift Tools 6.0.0
View More Packages from this Author

Dependencies

  • None
Last updated: Tue May 13 2025 09:08:12 GMT-0900 (Hawaii-Aleutian Daylight Time)