Skip to content

A Swift wrapper for a Rust library, allowing us to use Rust as a library within Swift.

License

Notifications You must be signed in to change notification settings

leecade/SwiftOxide

 
 

Repository files navigation

SwiftOxide

A small Swift package exposing a Rust Library to Swift. SwiftOxide doesn't contain any actual Rust code, instead the SwiftPM manifest has a link to a pre-built Rust binary. This was created to be used with the MunchausenNumbers App I've built for comparing the execution time between Rust and Swift, but you can also use the package with any other project if you want. This project is an update to Building and Deploying a Rust library on iOS which that is an update to the Building and Deploying a Rust library on iOS article from 2017.

Installation

Installing the package contained here can be found in Apple's documentation or in my article, Rust Library in Swift

Usage

Add import SwiftOxide to your code and then the following:

let results = SwiftOxide.rustMunchausenNum()

The results will be an Int array of four items, the Munchausen Numbers.

About

A Swift wrapper for a Rust library, allowing us to use Rust as a library within Swift.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 100.0%