Skip to content
CAI
Software that uses CAICheck a score

scinfu/SwiftSoup

53.3

Adequate · 14 November 2026

36.3k

lines of production code

Swift

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Added Example iOS application project

The repository now includes an Xcode project (Example.xcodeproj) for an iOS application named 'Example'. This project integrates the SwiftSoup framework via CocoaPods and includes source files for an AppDelegate, ViewController, and QueryViewController, along with standard iOS assets and storyboards.

Example/Example.xcodeproj · high confidence

Added Example workspace configuration

The Example workspace now includes a reference to the Pods project, enabling the example app to build against the CocoaPods dependencies.

Example/Example.xcworkspace · high confidence

Added Xcode workspace configuration for Swift Package

A new Xcode workspace file (contents.xcworkspacedata) has been added to the .swiftpm directory. This file configures the workspace to reference the package itself, enabling direct opening and editing of the Swift Package Manager project within Xcode.

.swiftpm · high confidence

Added iOS example app for SwiftSoup

The Example/Example directory now contains a complete iOS application that demonstrates how to use SwiftSoup. The app features a main view where users can input a URL and a CSS selector to fetch and parse HTML content, displaying the results in a table view. It also includes an 'Examples' screen that lists various CSS selector patterns with descriptions, allowing users to quickly test different queries against the fetched document.

Example/Example · high confidence

New benchmarking and profiling tools for SwiftSoup

Added a suite of command-line tools in the Tools directory to measure and verify the performance of SwiftSoup's parsing, serialization, and selector operations. The main SwiftSoupProfile tool supports A/B benchmarking modes and a wide range of workloads (e.g., fixtures, selector parsing, entity handling, and non-pretty serialization). Supporting scripts and Swift benchmarks (such as benchmark\_attribute\_observers, benchmark\_blank\_text, and benchmark\_character\_classification) provide targeted measurements for specific hot paths like tokenization, whitespace handling, and CSS selector evaluation, including verification modes to ensure correctness alongside performance data.

Tools · high confidence

Behavioural changes

Added platform-specific Info.plist files for SwiftSoup

The Resources directory now includes distinct Info.plist files for macOS, watchOS, and tvOS (in addition to the existing iOS one). These files define the bundle metadata, such as the bundle package type (FMWK) and version strings, ensuring that the SwiftSoup framework is correctly configured for each Apple platform.

Resources · high confidence

Refactor attributes to ByteSlice-backed storage with mutation tracking

The internal storage for HTML attributes has been migrated from String-based representations to \ByteSlice\ (zero-copy UTF-8 byte slices), significantly reducing memory allocations and improving parsing and serialization performance. To maintain correctness with this new value-type storage, a new mutation-tracking system (\AttributeMutationTracking\) has been introduced, allowing the \Attributes\ collection to efficiently notify owners of changes without requiring reference-counted wrapper objects for every attribute.

Sources · high confidence

Regenerated Xcode project with updated source files and build configuration

The SwiftSoup Xcode project file has been regenerated to reflect the current state of the source code. This update includes the addition of new source files such as AttributeMutationTracking, SelectorQueryKey, and BinarySearch, while removing obsolete files like PlatformTypes and SimpleDictionary. The build configuration has been adjusted to raise the macOS deployment target to version 12 and update the Swift language version to 6, ensuring compatibility with modern development environments.

SwiftSoup.xcodeproj · high confidence

Restored Xcode shared scheme for SwiftSoup

The project now includes a shared Xcode scheme (SwiftSoup.xcscheme) that configures the build, test, launch, profile, analyze, and archive actions for the SwiftSoup framework. This change restores the ability to run tests and launch the framework directly from Xcode, addressing previous issues where shared schemes were removed or lost during project restructuring.

SwiftSoup.xcodeproj/xcshareddata/xcschemes · high confidence

Test coverage

Added Xcode performance test baselines; Added macOS performance benchmarks for HTML and query parsing; Added test bundle configuration; Expanded test coverage for attribute handling, entity parsing, and virtual attributes.

Dependencies

SwiftSoup 2.11.3: Swift 6.0 support and updated platform requirements

SwiftSoup version 2.11.3 is now available, introducing support for Swift 6.0 and raising the minimum deployment targets to macOS 12, iOS 13, tvOS 13, and watchOS 6. The package manifest (Package.swift) has been updated to reflect these new platform constraints and Swift version, while the podspec continues to list Swift versions 4.0 through 5.1 for broader compatibility. Additionally, the resolved package dependencies now pin LRUCache to version 1.1.2 and swift-atomics to version 1.3.0.

(dependencies) · high confidence

Housekeeping

Added Xcode workspace configuration files

The project now includes the standard Xcode workspace data file (contents.xcworkspacedata) and the IDE workspace checks plist (IDEWorkspaceChecks.plist). These files configure the workspace structure for Xcode, ensuring proper project referencing and suppressing the 32-bit warning check.

SwiftSoup.xcodeproj/project.xcworkspace · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 60 → 53 (-6.6)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 60 → 44 (-15.6)
  • Architecture 87 → 95 (+7.4)
  • Maturity 50 → 51 (+0.8)
  • Readiness 69 → 68 (-0.7)
  • Security 84 → 68 (-16.2)

Resolved (76)

  • Duplicated block (10 lines × 2) (Sources/Evaluator.swift)
  • Duplicated block (10 lines × 2) (Sources/HtmlTreeBuilderState.swift)
  • Duplicated block (10–11 lines × 2) (Tools/SwiftSoupProfile/main.swift)
  • Duplicated block (10–13 lines × 2) (Tools/SwiftSoupProfile/main.swift)
  • Duplicated block (11 lines × 4) (Sources/CharacterReader.swift)
  • Duplicated block (13 lines × 2) (Sources/Entities.swift)
  • Duplicated block (13 lines × 3) (Sources/StringBuilder.swift)
  • Duplicated block (14 lines × 2) (Sources/HtmlTreeBuilderState.swift)
  • Duplicated block (14 lines × 3) (Sources/StringBuilder.swift)
  • Duplicated block (15 lines × 2) (Sources/StringUtil.swift)
  • Duplicated block (16 lines × 2) (Sources/HtmlTreeBuilder.swift)
  • Duplicated block (18 lines × 2) (Sources/StringUtil.swift)
  • Duplicated block (5 lines × 2) (Sources/Element.swift)
  • Duplicated block (5 lines × 2) (Tools/benchmark_exclusion.swift)
  • Duplicated block (5 lines × 4) (Tools/compare_exclusion.py)
  • Duplicated block (6 lines × 3) (Sources/HtmlTreeBuilderState.swift)
  • Duplicated block (7 lines × 3) (Tools/SwiftSoupProfile/main.swift)
  • Duplicated block (9 lines × 2) (Tools/SwiftSoupProfile/main.swift)
  • Duplicated block (9–10 lines × 3) (Sources/HtmlTreeBuilderState.swift)
  • Edited copy of a member (22 corresponding lines) (Sources/HtmlTreeBuilder.swift)
  • …and 56 more

New (119)

  • Duplicated block (10 lines × 2) (Sources/Evaluator.swift)
  • Duplicated block (10 lines × 2) (Sources/HtmlTreeBuilderState.swift)
  • Duplicated block (10–11 lines × 2) (Tools/SwiftSoupProfile/main.swift)
  • Duplicated block (10–13 lines × 2) (Tools/SwiftSoupProfile/main.swift)
  • Duplicated block (11 lines × 4) (Sources/CharacterReader.swift)
  • Duplicated block (11–14 lines × 2) (Sources/Element.swift)
  • Duplicated block (13 lines × 2) (Sources/Entities.swift)
  • Duplicated block (13 lines × 2) (Sources/HtmlTreeBuilderState.swift)
  • Duplicated block (13 lines × 3) (Sources/StringBuilder.swift)
  • Duplicated block (14 lines × 3) (Sources/StringBuilder.swift)
  • Duplicated block (15 lines × 2) (Sources/StringUtil.swift)
  • Duplicated block (18 lines × 2) (Sources/StringUtil.swift)
  • Duplicated block (5 lines × 2) (Tools/benchmark_exclusion.swift)
  • Duplicated block (6 lines × 3) (Sources/HtmlTreeBuilderState.swift)
  • Duplicated block (7 lines × 3) (Tools/SwiftSoupProfile/main.swift)
  • Duplicated block (9 lines × 2) (Tools/SwiftSoupProfile/main.swift)
  • Duplicated block (9–10 lines × 3) (Sources/HtmlTreeBuilderState.swift)
  • Edited copies of one member (3 members, 10+ corresponding lines) (Sources/DocumentType.swift)
  • Edited copies of one member (3 members, 10+ corresponding lines) (Sources/Element.swift)
  • Edited copies of one member (3 members, 12+ corresponding lines) (Sources/Elements.swift)
  • …and 99 more

Changes since last survey

  • 18 commits — 17 feature/other, 1 fixes

By area

  • Tests/SwiftSoupTests — 6 commits
  • Sources/Elements.swift — 5 commits
  • (root) — 3 commits
  • Sources/Element.swift — 2 commits
  • (repo) — 1 commit
  • Sources/HtmlTreeBuilder.swift — 1 commit

Notable commits

  • fix: Respect live parser scope boundaries and strengthen regression coverage
  • change: Bound snapshot preflight and detach invalidated caches before callbacks
  • change: Keep paragraph scope tracking current when closing elements
  • change: Limit scope-cache maintenance to trusted construction
  • change: Merge pull request #475 from lake-of-fire/codex/review-pr473-474-20261110
  • change: Optimize small Elements removals
  • change: Preserve callback mutations and detached removal indexes
  • change: Preserve existing parser hot-loop code generation
  • change: Preserve mutation versions when batching sibling slices
  • change: Preserve parser and removal behavior in batched optimizations
  • change: Preserve removal callbacks from bridged Foundation storage
  • change: Preserve removal callbacks from custom ancestors
  • change: Preserve removal order when selector snapshots release subtrees
  • change: Preserve selection order when batching sibling removals
  • change: Release rejected removal plans before custom callbacks
  • change: Remove selected elements per parent in Elements.remove
  • change: Scan sibling runs without per-element range updates
  • change: Simplify removal batching while preserving callback order

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

scinfu/SwiftSoup was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 14 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 8397a860c6955924b584c50c5265c6aac0970015 — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-3c33c1882dc1.