1.0.0
After not touching this project for months on account of being stumped by how to make stuff work properly, I'm super excited to be releasing v1.0.0 of swift-rs
!
Breaking Changes
- Everything is now exported from the root of the crate, so no more
build::*
ortypes::*
imports link_swift
functions are gone in favour ofSwiftLinker
New Traits + Macro
Manually writing extern "C"
blocks are now a thing of the past thanks to the swift!
macro!
This macro enforces that your argument and return types are compatible with Swift thanks to the SwiftArg
and SwiftRet
traits respectively, and allows for...
Improved Memory Safety
SRObject
values are now properly dropped, and swift!
is capable of 'stealing' objects from Swift's reference counting system, allowing Rust to have full control over the lifetime of Swift data! This wouldn't have been possible without @amodm's help, many thanks to him.
SwiftLinker
Gone are the old link_swift
and link_swift_package
functions, now SwiftLinker
can be used to build up a configuration and then link everything at once!
iOS Support
Thanks to @lucasfernog, swift-rs
will be powering Tauri mobile on iOS! If you can figure out how to run Rust on iOS, then calling with_ios
on your SwiftLinker
should work.
I've got a few more ideas for this library but won't execute on them for a while in order to focus on other projects.
Thank you to everyone who has contributed, I couldn't have done this without you!