All Projects → marinofelipe → swift-package-info

marinofelipe / swift-package-info

Licence: MIT license
Swift CLI tool that provides information about a Swift Package

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to swift-package-info

BetterMappable
Better Mappable through Property Wrappers using ObjectMapper
Stars: ✭ 26 (-60%)
Mutual labels:  swift-package-manager, swiftpackage
SwiftZip
Swift wrapper for libzip — library for reading, creating, and modifying zip archives.
Stars: ✭ 44 (-32.31%)
Mutual labels:  swift-package-manager
xcbeautify
A little beautifier tool for xcodebuild
Stars: ✭ 687 (+956.92%)
Mutual labels:  swift-package-manager
Tablier
A micro-framework for Table Driven Tests.
Stars: ✭ 33 (-49.23%)
Mutual labels:  swift-package-manager
Swift-FFDB
a Object/Relational Mapping (ORM) support to iOS and MacOS .Since SwiftFFDB is build on top of FMDB.
Stars: ✭ 22 (-66.15%)
Mutual labels:  swift-package-manager
SwiftDown
📦 A themable markdown editor component for your SwiftUI apps.
Stars: ✭ 203 (+212.31%)
Mutual labels:  swift-package-manager
extensions-kit
📦 Collection of Swift+Apple Frameworks extensions for speeding up software development [iOS & iPadOS].
Stars: ✭ 71 (+9.23%)
Mutual labels:  swift-package-manager
nef-editor-client
📱Client-side code for the nef editor app
Stars: ✭ 20 (-69.23%)
Mutual labels:  swift-package-manager
xxHash-Swift
xxHash framework in Swift.
Stars: ✭ 22 (-66.15%)
Mutual labels:  swift-package-manager
Table
CLI tables in Swift
Stars: ✭ 53 (-18.46%)
Mutual labels:  swift-package-manager
Bytes
Swift Library for working with sequences of Bytes (aka [UInt8])
Stars: ✭ 35 (-46.15%)
Mutual labels:  swift-package-manager
SupportEmail
Pre-populates emails with support information in iOS/iPadOS apps
Stars: ✭ 20 (-69.23%)
Mutual labels:  swift-package-manager
Match3Kit
Library for simple Match3 games.
Stars: ✭ 38 (-41.54%)
Mutual labels:  swift-package-manager
swift-watch
Watches over your Swift project's source
Stars: ✭ 43 (-33.85%)
Mutual labels:  swift-package-manager
aescryptable
AES encryption/decryption with random iv. Swift 5 and up.
Stars: ✭ 29 (-55.38%)
Mutual labels:  swift-package-manager
SwiftTweener
A pure Swift animation engine.
Stars: ✭ 74 (+13.85%)
Mutual labels:  swift-package-manager
CSV
A simple CSV file parser and serializer
Stars: ✭ 31 (-52.31%)
Mutual labels:  swift-package-manager
Cider
The Missing Apple Music SDK. Written in Swift.
Stars: ✭ 57 (-12.31%)
Mutual labels:  swift-package-manager
SwiftBuilder
SwiftBuilder is a fast way to assign new value to the property of the object.
Stars: ✭ 26 (-60%)
Mutual labels:  swiftpackage
TIFeedParser
RSS Parser written in Swift
Stars: ✭ 18 (-72.31%)
Mutual labels:  swiftpackage

CI Swift Package Manager Twitter

Swift Package Info

CLI tool that provides information about a given Swift Package product, such as a measurament of its binary size impact. It's built on top of Swift Argument Parser.

Usage

OVERVIEW: A tool for analyzing Swift Packages

Provides valuable information about a given Swift Package,
that can be used in your favor when deciding whether to
adopt or not a Swift Package as a dependency on your app.

USAGE: swift-package-info <subcommand>

OPTIONS:
  --version               Show the version.
  -h, --help              Show help information.

SUBCOMMANDS:
  binary-size             Estimated binary size of a Swift Package product.
  platforms               Shows platforms supported b a Package product.
  dependencies            List dependencies of a Package product.
  full-analyzes (default) All available information about a Swift Package product.

  See 'swift-package-info help <subcommand>' for detailed help.

Examples

  • Run a full analyzes
swift-package-info --for https://github.com/ReactiveX/RxSwift -v 6.0.0 --product RxSwift
  • Check supported platforms (sub command)
swift-package-info platforms --for https://github.com/krzyzanowskim/CryptoSwift -v 1.3.8 --product CryptoSwift
  • See binary size of a local pacakge (e.g. under development framework)
swift-package-info binary-size --path ../project/my-framework

Report

swift-package-info --for https://github.com/ReactiveX/RxSwift -v 6.0.0 --product RxSwift
+------------------------------------------------+
|               Swift Package Info               |
|                                                |
|                 RxSwift, 6.0.0                 |
+--------------+---------------------------------+
| Provider     | Results                         |
+--------------+---------------------------------+
| Binary Size  | Binary size increases by 963 KB |
| Platforms    | System default                  |
| Dependencies | No third-party dependencies :)  |
+--------------+---------------------------------+
> Total of 3 providers used.

A custom report strategy can be passed via the report argument (check --help for supported values)

swift-package-info --for https://github.com/ReactiveX/RxSwift -v 6.0.0 --product RxSwift --report jsonDump
{
  "binarySize" : {
    "amount" : 962560,
    "formatted" : "963 KB"
  },
  "dependencies" : [

  ],
  "platforms" : {

  }
}

Installation

  • Install mint.
  • Run: mint install marinofelipe/swift-package-info

Building

Build from Swift Package Manager

  • swift build in the top level directory
  • The built utility can be found in .build/debug/swift-package-info
  • Run with swift run

Running tests

Run from Xcode

  • Add the project directory to swift-package-info scheme customWorkingDirectory
  • Run the tests

Run from command line

  • swift test --build-path PROJECT_DIR

Dependencies

Binary size report

Its methodology is inspired by cocoapods-size, and thus works by comparing archives with no bitcode and ARM64 arch. Such strategy has proven to be consistent with the size added to iOS apps downloaded and installed via TestFlight.

Thanks

Special thanks to @unnamedd for sharing his experience with swift-tools-support-core and on how to build a pretty 👌 report.

Contributions

Swift Package Info is fully open and your contributions are more than welcome.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].