Struct swift_rs::SwiftLinker
source · pub struct SwiftLinker { /* private fields */ }
Available on crate feature
build
only.Expand description
Builder for linking the Swift runtime and custom packages.
Implementations§
source§impl SwiftLinker
impl SwiftLinker
sourcepub fn new(macos_min_version: &str) -> Self
pub fn new(macos_min_version: &str) -> Self
Creates a new SwiftLinker
with a minimum macOS verison.
Minimum macOS version must be at least 10.13.
sourcepub fn with_ios(self, min_version: &str) -> Self
pub fn with_ios(self, min_version: &str) -> Self
Instructs the SwiftLinker
to also compile for iOS
using the specified minimum iOS version.
Minimum iOS version must be at least 11.
sourcepub fn with_package(self, name: &str, path: impl AsRef<Path>) -> Self
pub fn with_package(self, name: &str, path: impl AsRef<Path>) -> Self
Adds a package to be linked against.
name
should match the name
field in your Package.swift
,
and path
should point to the root of your Swift package relative
to your crate’s root.