Swiftpack.co - Swift Packages by Brendonovich

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.

Packages published by Brendonovich

Brendonovich/swift-rs 1.0.6
Call Swift functions from Rust with ease!
⭐️ 222
🕓 36 weeks ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
1.0.6
36 weeks ago
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 https://github.com/Brendonovich/swift-rs/pull/48 * Fix the broken cross-compile command with Xcode15 SDK by @pewsheen in https://github.com/Brendonovich/swift-rs/pull/51 * Create SRData from slices by @irh in https://github.com/Brendonovich/swift-rs/pull/52 * force using system clang unless overridden by @Brendonovich in https://github.com/Brendonovich/swift-rs/pull/54 ## New Contributors * @HeavenVolkoff made their first contribution in https://github.com/Brendonovich/swift-rs/pull/48 * @pewsheen made their first contribution in https://github.com/Brendonovich/swift-rs/pull/51 * @irh made their first contribution in https://github.com/Brendonovich/swift-rs/pull/52 **Full Changelog**: https://github.com/Brendonovich/swift-rs/compare/1.0.5...1.0.6
1.0.5
1 year ago
## `--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
1 year ago
### 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
1 year ago
Turns out that `clang_rt` has to be handled specially for the iOS simulator, who'd have guessed.
1.0.2
1 year ago
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
1 year ago
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! <br> Big thanks to my 5 (!!!) sponsors!
1.0.0
1 year ago
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](https://tauri.app/blog/2022/12/09/tauri-mobile-alpha/) 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
2 years ago
## 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
iOS macOS

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics