Releases: Brendonovich/swift-rs
1.0.7
1.0.6
A lot of small fixes in this one, thanks to everyone who has been reporting issues and submitting PRs!
What's Changed
- Enable cross-compiling for macOS targets by @HeavenVolkoff in #48
- Fix the broken cross-compile command with Xcode15 SDK by @pewsheen in #51
- Create SRData from slices by @irh in #52
- force using system clang unless overridden by @Brendonovich in #54
New Contributors
- @HeavenVolkoff made their first contribution in #48
- @pewsheen made their first contribution in #51
- @irh made their first contribution in #52
Full Changelog: 1.0.5...1.0.6
1.0.5
--build-path
now used instead of --scratch-path
(#47) by @lucasfernog
Turns out --scratch-path
doesn't do what I thought and is only available for newer Swift versions.
1.0.4
iOS Simlator Fix (#40) by @Berrysoft
Hopefully more things work and #42 is fixed.
SRData utilities (#44) by @LeviticusNelson
SRData
can now be created from &Vec<u8>
, allowing byte buffers to be passed between Rust and Swift easily.
1.0.3
Turns out that clang_rt
has to be handled specially for the iOS simulator, who'd have guessed.
1.0.2
Just a quick fix for iOS support today! Thanks to @lucasfernog we now link against clang_rt.ios
, hopefully alleviating any ___isPlatformVersionAtLeast
errors.
1.0.1
Just a few changes here, nothing crazy.
Swift artefacts now stored in OUT_DIR
(#32)
The .build
folder is now redirected to OUT_DIR
, making it much easier to publish crates that contain Swift code.
It also allows for...
Automatic recompilation when Swift files are modified (#28)
With compilation artefacts being away from source code, it's now safe for swift-rs
to instruct Cargo to recompile Swift packages anytime their contents change!
Big thanks to my 5 (!!!) sponsors!
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!
v0.3.0
New Features
- Optional
NSObject
values are now supported (#4) - Objects created in Swift are now released when their Rust counterparts are dropped (#2)
- Build script has been updated to support M1 Macs (#6)
Changes
- Build module has been renamed from
build_utils
tobuild
and is behind corresponding Cargo feature (avoids requiringserde
andserde_json
to be included by default) - Serde support is now behind Cargo feature
serde
getMounts
example no longer leaks huge amounts of memory