leecade / SwiftOxide

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.

License:GNU General Public License v3.0


Languages

Language:Swift 100.0%