PackageTrack
Sign in Get early access

swift-rs

Call Swift from Rust with ease!

1.0.8 14M downloads/mo #2633 most downloaded on crates.io Brendonovich/swift-rs

What this package is like to depend on

Last release 3 days ago

20 Aug 2026

Release timing varies

gaps range from 2 weeks to 2.0 years

Most releases are documented

notes for 10 of 15 stable releases

Nothing withdrawn

no release was ever pulled

5 years old

15 releases · first in 2021

1 release in the last 12 months

see the full history below

Release timeline

15 releases · Oct 2021 to Aug 2026
2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 15
  1. 1.0.8 20 Aug 2026

    Nothing published for this version

  2. 1.0.7 27 Aug 2024
    Release notes

    Better Tauri compatibility thanks to #66

    Open source →
  3. 1.0.6 06 Aug 2023
    Release notes

    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

    Open source →
  4. 1.0.5 10 Apr 2023
    Release notes

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

    Open source →
  5. 1.0.4 05 Apr 2023
    Release notes

    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.

    Open source →
  6. 1.0.3 18 Mar 2023
    Release notes

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

    Open source →
  7. 1.0.2 17 Mar 2023
    Release notes

    Just a quick fix for iOS support today! Thanks to @lucasfernog we now link against clang_rt.ios, hopefully alleviating any ___isPlatformVersionAtLeast errors.

    Open source →
  8. 1.0.1 13 Mar 2023
    Release notes

    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!

    Open source →
  9. 1.0.0 28 Feb 2023
    Release notes

    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!

    Open source →
  10. 0.3.0 27 Mar 2022
    Release notes

    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
    Open source →
  11. 0.2.3 23 Dec 2021
    Release notes

    bump version & macos target

    Open source →
  12. 0.2.2 07 Nov 2021

    Nothing published for this version

  13. 0.2.1 03 Nov 2021

    Nothing published for this version

  14. 0.2.0 01 Nov 2021

    Nothing published for this version

  15. 0.1.0 20 Oct 2021

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive