Skip to content

Releases: Brendonovich/swift-rs

1.0.7

27 Aug 03:01
f64a451
Compare
Choose a tag to compare

Better Tauri compatibility thanks to #66

1.0.6

06 Aug 08:16
Compare
Choose a tag to compare

A lot of small fixes in this one, thanks to everyone who has been reporting issues and submitting PRs!

What's Changed

New Contributors

Full Changelog: 1.0.5...1.0.6

1.0.5

10 Apr 04:31
Compare
Choose a tag to compare

--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

05 Apr 07:22
Compare
Choose a tag to compare

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

18 Mar 13:46
Compare
Choose a tag to compare

Turns out that clang_rt has to be handled specially for the iOS simulator, who'd have guessed.

1.0.2

17 Mar 15:14
Compare
Choose a tag to compare

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

13 Mar 14:37
Compare
Choose a tag to compare

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

28 Feb 15:21
Compare
Choose a tag to compare

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::* or types::* imports
  • link_swift functions are gone in favour of SwiftLinker

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

27 Mar 01:55
Compare
Choose a tag to compare

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 to build and is behind corresponding Cargo feature (avoids requiring serde and serde_json to be included by default)
  • Serde support is now behind Cargo feature serde
  • getMounts example no longer leaks huge amounts of memory