Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
b521f771d8991e6f1d8e65ae05a8d783 authored Jan 30, 2025
1 parent 8acacb5 commit c0d288d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions book/src/building/swift-packages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ Usage on Linux is a little bit different than on macOS. This guide will help you
* Set up Package.swift so that "cargo build" is called (You can use something like this here: "https://stackoverflow.com/questions/26971240/how-do-i-run-a-terminal-command-in-a-swift-script-e-g-xcodebuild" to invoke cargo during a swift build)
* Set up swift-bridge according to the guide (see chapter "swiftc and cargo")
* Link against swift-bridge and your library, like the one below:
```
```swift
targets: [
.executableTarget(
name: "proj",
Expand All @@ -261,7 +261,7 @@ targets: [
```
* this ensures that the flags that are normally passed via swiftc are forwarded during swift-build
* Since the path of the resulting rust library "target/debug" depends on the build type, you can set a global variable like this:
```
```swift
#if DEBUG
let buildType = "debug"
#else
Expand Down

0 comments on commit c0d288d

Please sign in to comment.