Swiftpack.co - lemire/Swimsuit as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by lemire.
lemire/Swimsuit v0.1.3
A Swift library for accurate benchmarks
⭐️ 0
🕓 4 years ago
.package(url: "https://github.com/lemire/Swimsuit.git", from: "v0.1.3")

Swimsuit : A Swift library for accurate benchmarks

Complete example for library users

Create a directory where you will create your application:

mkdir fun
cd fun
swift package init --type executable

Then edit Package.swift so that it reads:

import PackageDescription

let package = Package(
    name: "fun",
    dependencies: [
   .package(url: "https://github.com/lemire/Swimsuit.git", from: "0.1.2")
    ],
    targets: [
        .target(
            name: "fun",
            dependencies: ["Swimsuit"]),
    ]
)

Edit main.swift (in Sources) so that it looks something like this :

import Swimsuit;

let nano = Swimsuit.nanotime() {
   print("do something")
}

You can run your example as follows:

swift build --configuration release
$(swift build   --configuration release --show-bin-path)/fun

For Xcode users (Mac Only)

$ swift package generate-xcodeproj
generated: ./Bitset.xcodeproj
$ open ./Bitset.xcodeproj

GitHub

link
Stars: 0
Last commit: 4 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

Version 0.1.3
4 years ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics