This gist shows a quick overview of calling Rust in a Swift project, with Swift Package Manager configured.
Let's go ahead and create a folder containing all our sources:
mkdir swift-rs && cd $_
# Generate ed25519 privkey | |
openssl genpkey -algorithm ed25519 -out privkey.pem | |
# export its pubkey | |
openssl pkey -in privkey.pem -pubout -out pubkey.pem | |
# Generate RSA privkey | |
openssl genrsa -des3 -out private.pem 2048 | |
# export its pubkey | |
openssl rsa -in private.pem -outform PEM -pubout -out public.pem |
#!/bin/bash | |
# Copyright 2017 Keefer Rourke <mail@krourke.org> | |
# | |
# Permission to use, copy, modify, and/or distribute this software for any | |
# purpose with or without fee is hereby granted, provided that the above | |
# copyright notice and this permission notice appear in all copies. | |
# | |
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCNUMBERLAIMS ALL WARRANTIES WITH | |
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY |