Swift Package Index


Sugar for Swift


  • The latest stable release is 0.2.0. Released almost 2 years ago.
  • The last commit to master was almost 2 years ago.

Swift Version Compatibility

  • 0.2.0 and master
    5.3
    5.2
    5.1
    5.0
    4.2
Full build results

Platform Compatibility

  • 0.2.0 and master
    iOS
    macOS(Intel)
    macOS(ARM)
    Linux
    tvOS
    watchOS
Full build results

Sugar

Build Status Carthage compatible

Sugar for Swift -- Ruby Core sweetness and more for Swift.

If you're looking for a complete Ruby Core implementation, see this: RubyNative/SwiftRuby

Usage

You can use this project with Carthage and Swift Package Manager.

Carthage

Sugar supports iOS, OS X, tvOS and watchOS 2(?) by using Carthage. Add following line to your Cartfile:

github "venj/Sugar" ~> 0.1.0

Add both Sugar.framework and CommonCrypto.framework to your project.

Swift Package Manager

Swift Package Manager only supports OS X target and Linux target for now. Add dependency code in your Package.swift:

dependencies: [
    .Package(url: "https://github.com/venj/Sugar.git", versions: Version(0,1,0) ..< Version(1,0,0)),
]

If you are on Linux, you may also need to install OpenSSL library headers.

sudo apt-get install libssl-dev

Now, in your code:

import Sugar

Note: There are many extension methods missing on Linux platform as they require methods that only available on OS X. As Apple's cross-platform Foundation library expanding, these extension methods would be finally available on Linux.

Documentation

  1. Install the tool

    gem install jazzy
    
  2. Generate documentation

    jazzy
    
  3. Read documentation in docs directory.

See main.swift for an example.

Known Issues

Currently, playgrounds in the sample project is not working.