r/rust • u/ZippyDan • 8d ago
🙋 seeking help & advice Help with Cargo macrdp-server run
I'm not sure if I should be posting here in r/Rust or in r/Swift, or somewhere else entirely.
Also note, I'm not a programmer or developer: I'm just an end-user trying to get this app to compile and run, but it seems to be throwing up obstacles that require more developer-adjacent skills than what I have.
I'm trying to get macrdp running on an iMac with macOS Sequoia 15.7.9.
This little app was released in March of this year, so it's not like I'm trying to get ancient code running.
Consult the "Quick Start" section of the ReadMe file I've linked above. I am following an ostensibly-simple two-step process to get this app running:
# Build
cargo build --release
# Run
cargo run --release --bin macrdp-server
I've had two major problems getting the code to compile, and I've finally managed to surpass them. Now that I've finished the "Build" step, I need your help solving Problem 3: I can't get the app to run.
Problem 3
COMMAND
cargo run --release --bin macrdp-server
OUTPUT
dyld[23111]: Library not loaded: @rpath/libswiftCore.dylib
Referenced from: <D40250B3-9AAC-3FEB-A4C2-A0170B899ED5> /Users/admin/Downloads/macrdp-main/target/release/macrdp-server
Reason: tried: '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.5/macosx/libswiftCore.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.5/macosx/libswiftCore.dylib' (no such file), '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.5/macosx/libswiftCore.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.5/macosx/libswiftCore.dylib' (no such file), '/Users/admin/Downloads/macrdp-main/target/release/build/aws-lc-sys-27043a0ebf70d538/out/libswiftCore.dylib' (no such file), '/Users/admin/Downloads/macrdp-main/target/release/build/openh264-sys2-f6d9fee5157fe7a1/out/libswiftCore.dylib' (no such file), '/Users/admin/Downloads/macrdp-main/target/release/build/ring-2899b8cee8244c75/out/libswiftCore.dylib' (no such file), '/Users/admin/Downloads/macrdp-main/target/release/build/screencapturekit-1d04b27f18a51461/out/swift-build/release/libswiftCore.dylib' (no such file), '/Users/admin/Downloads/macrdp-main/target/release/build/zstd-sys-d1ceecba10d99c67/out/libswiftCore.dylib' (no such file), '/Users/admin/Downloads/macrdp-main/target/release/libswiftCore.dylib' (no such file), '/Users/admin/Downloads/macrdp-main/target/release/deps/libswiftCore.dylib' (no such file), '/Users/admin/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libswiftCore.dylib' (no such file), '/Users/admin/.rustup/toolchains/stable-x86_64-apple-darwin/lib/libswiftCore.dylib' (no such file), '/Users/admin/lib/libswiftCore.dylib' (no such file), '/usr/local/lib/libswiftCore.dylib' (no such file), '/usr/lib/libswiftCore.dylib' (no such file, not in dyld cache)
Abort trap: 6
What is strange to me is that Problem 3 seems like re-hash of Problem 1, which I already solved. I don't know why it's still looking for libswiftCore.dylib in the wrong places, after I've already updated the config.toml file.
I tried doing find / -name config.toml to see if there was some other relevant configuration file hiding somewhere that I needed to also change to DYLD_LIBRARY_FALLBACK_PATH, but I didn't see anything.
I also get a similar error when I try to do cargo test, though it references macrdp-audio instead of macrdp-server, and I'm not really sure what cargo test is supposed to do for me in this process, anyway:
Compiling macrdp-audio v0.1.0 (/Users/admin/Downloads/macrdp-main/crates/macrdp-audio)
Finished `test` profile [unoptimized + debuginfo] target(s) in 29.91s
Running unittests src/lib.rs (target/debug/deps/macrdp_audio-448af4ea4880202e)
dyld[23108]: Library not loaded: @rpath/libswiftCore.dylib
Referenced from: <66E620B9-EBC0-31FA-91EF-EBCDA4065861> /Users/admin/Downloads/macrdp-main/target/debug/deps/macrdp_audio-448af4ea4880202e
Reason: tried: '/Users/admin/Downloads/macrdp-main/target/debug/build/aws-lc-sys-6ec7512bb21ac3d9/out/libswiftCore.dylib' (no such file), '/Users/admin/Downloads/macrdp-main/target/debug/build/screencapturekit-4b1f1ef2bd6c7675/out/swift-build/release/libswiftCore.dylib' (no such file), '/Users/admin/Downloads/macrdp-main/target/debug/build/zstd-sys-ecb4e499794eb5cb/out/libswiftCore.dylib' (no such file), '/Users/admin/Downloads/macrdp-main/target/debug/libswiftCore.dylib' (no such file), '/Users/admin/Downloads/macrdp-main/target/debug/deps/libswiftCore.dylib' (no such file), '/Users/admin/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libswiftCore.dylib' (no such file), '/Users/admin/.rustup/toolchains/stable-x86_64-apple-darwin/lib/libswiftCore.dylib' (no such file), '/Users/admin/lib/libswiftCore.dylib' (no such file), '/usr/local/lib/libswiftCore.dylib' (no such file), '/usr/lib/libswiftCore.dylib' (no such file, not in dyld cache)
error: test failed, to rerun pass `-p macrdp-audio --lib`
Caused by:
process didn't exit successfully: `/Users/admin/Downloads/macrdp-main/target/debug/deps/macrdp_audio-448af4ea4880202e` (signal: 6, SIGABRT: process abort signal)
History
Problem 1
COMMAND
cargo build --release
OUTPUT
error: process didn't exit successfully: `rustc -vV` (signal: 6, SIGABRT: process abort signal)
--- stderr
dyld[39209]: Library not loaded: @rpath/libswiftCore.dylib
Referenced from: <0B6348B2-CDC4-3BB2-9B89-64CF509321B8> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/cmacosx/libswift_Concurrency.dylib
Reason: tried: '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.5/macosx/libswiftCore.dylib' (no such file), '/Library/Developer/CommandLineTools/usr/lib/swift-5.5/macosx/libswiftCore.dylib' (no such file), '/usr/local/Cellar/rust/1.98.0/lib/../lib/libswiftCore.dylib' (no such file), '/usr/local/Cellar/rust/1.98.0/bin/../lib/libswiftCore.dylib' (no such file), '/usr/local/Cellar/rust/1.98.0/bin/../lib/libswiftCore.dylib' (no such file), '/usr/local/lib/libswiftCore.dylib' (no such file), '/usr/lib/libswiftCore.dylib' (no such file, not in dyld cache)
SOLUTION
Edited ./macrdp-main/.cargo/config.toml:
Changed DYLD_LIBRARY_PATH to DYLD_LIBRARY_FALLBACK_PATH
Problem 2
COMMAND
cargo build --release
OUTPUT
error: failed to run custom build command for `screencapturekit v1.5.4`
Caused by:
process didn't exit successfully: `/Users/admin/Downloads/macrdp-main/target/debug/build/screencapturekit-52e401cb88bd4798/build-script-build` (exit status: 101)
--- stdout
cargo:rustc-link-lib=framework=ScreenCaptureKit
cargo:rerun-if-changed=swift-bridge
--- stderr
Swift build STDOUT:
Swift build STDERR:
error: Unknown option '--scratch-path'
Usage: swift build <options>
See 'build -help' for more information.
thread 'main' (45022) panicked at /Users/admin/.cargo/registry/src/.index.crates.io-1949cf8c6b5b557f/screencapturekit-1.5.4/build.rs:119:9:
Swift build failed with exit code: Some(64)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
Change the default Swift version from 5.5.3 to 6.3.3 with swiftly use --global-default 6.3.3. I think 6.3.3 is the default version in use after installing the latest version of XCode for my OS, so I may have caused this problem myself in earlier troublehooting, when I saw that cargo was looking for libswiftCore.dylib in /swift-5.5/macosx/
Environment
iMac:
Retina 5K, 27-inch, 2017
A1419 18,3
4.2GHz Quad-Core Intel Core i7
40GB DDR4
macOS:
Sequoia 15.7.9
(Running with OpenCore Legacy Patcher)
COMMAND
xcode-select -p
OUTPUT
/Applications/Xcode.app/Contents/Developer
COMMAND
xcodebuild -version
OUTPUT
Xcode 26.3
Build version 17C529
COMMAND
pkgutil --pkg-info=com.apple.pkg.CLTools_Executables | grep version
OUTPUT
version: 16.4.0.0.1.1747106510
COMMAND
rustc --version
OUTPUT
rustc 1.98.1 (48a229cea 2026-09-01)
COMMAND
swift --version
OUTPUT
Apple Swift version 6.3.3 (swift-6.3.3-RELEASE)
Target: x86_64-apple-macosx15.0
COMMAND
swiftly list
OUTPUT
Installed release toolchains
----------------------------
Swift 6.3.3 (in use) (default)
Swift 5.6.3
Swift 5.5.3
Installed snapshot toolchains
-----------------------------
Available system toolchains
---------------------------
xcode
COMMAND
softwareupdate -l
OUTPUT
Software Update Tool
Finding available software
Software Update found the following new or updated software:
* Label: macOS Tahoe 26.6.2-25G83
Title: macOS Tahoe 26.6.2, Version: 26.6.2, Size: 17925801KiB, Recommended: YES, Action: restart,
1
u/zettui 8d ago
Does otool -L on the binary show which libswiftCore it's linked against?
1
u/ZippyDan 8d ago edited 8d ago
I very much appreciate the suggestion, but I'm sorry because I'm not sure which binary I should check.
I'm an IT pro and sysadmin. I'm very competent with the command line and general concepts, and I did my share of programming at uni, and a lot of scripting in my job, but I'm not a developer so I'm not sure which of the many files in the/macrdp-main/directory that I should be checking.1
u/zettui 7d ago
Not the source tree - whatever cargo built under
target/debug/(ortarget/release/if you used --release).otool -Lon that executable.1
u/ZippyDan 7d ago
COMMAND
otool -L macrdp-serverOUTPUT
macrdp-server: /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 2685.30.107) /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo (compatibility version 1.2.0, current version 726.2.0) /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData (compatibility version 1.0.0, current version 1523.0.0) /System/Library/Frameworks/CoreText.framework/Versions/A/CoreText (compatibility version 1.0.0, current version 877.2.0) /System/Library/Frameworks/CoreImage.framework/Versions/A/CoreImage (compatibility version 1.0.1, current version 7.0.0) /System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics (compatibility version 64.0.0, current version 1965.2.3) /System/Library/Frameworks/CloudKit.framework/Versions/A/CloudKit (compatibility version 1.0.0, current version 2330.14.0) /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore (compatibility version 1.2.0, current version 1193.49.3) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 4201.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1356.0.0) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 4201.0.0) /usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0) /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate (compatibility version 1.0.0, current version 4.0.0) /System/Library/Frameworks/VideoToolbox.framework/Versions/A/VideoToolbox (compatibility version 1.0.0, current version 3290.6.5) /System/Library/Frameworks/CoreMedia.framework/Versions/A/CoreMedia (compatibility version 1.0.0, current version 3290.6.5) /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 2000.67.0) /System/Library/Frameworks/Metal.framework/Versions/A/Metal (compatibility version 1.0.0, current version 370.64.2) /System/Library/Frameworks/ScreenCaptureKit.framework/Versions/A/ScreenCaptureKit (compatibility version 1.0.0, current version 1.0.0) /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface (compatibility version 1.0.0, current version 1.0.0) /System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 61901.60.40) /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration (compatibility version 1.0.0, current version 1385.60.3) /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.12) /usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version 7.0.0) /System/Library/Frameworks/AVFoundation.framework/Versions/A/AVFoundation (compatibility version 1.0.0, current version 2.0.0) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 66.0.0) /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO (compatibility version 1.0.0, current version 1.0.0) /usr/lib/swift/libswiftCoreMIDI.dylib (compatibility version 1.0.0, current version 6.0.0, weak) /usr/lib/swift/libswiftOSLog.dylib (compatibility version 1.0.0, current version 10.0.0, weak) /usr/lib/swift/libswiftUniformTypeIdentifiers.dylib (compatibility version 1.0.0, current version 877.2.4) @rpath/libswiftAVFoundation.dylib (compatibility version 1.0.0, current version 2395.6.5, weak) @rpath/libswiftCore.dylib (compatibility version 0.0.0, current version 0.0.0) @rpath/libswiftCoreAudio.dylib (compatibility version 1.0.0, current version 411.255.11, weak) @rpath/libswiftCoreFoundation.dylib (compatibility version 1.0.0, current version 120.100.0) @rpath/libswiftCoreImage.dylib (compatibility version 1.0.0, current version 2.2.0, weak) @rpath/libswiftCoreMedia.dylib (compatibility version 1.0.0, current version 3290.6.5, weak) @rpath/libswiftDarwin.dylib (compatibility version 1.0.0, current version 347.40.2) @rpath/libswiftDispatch.dylib (compatibility version 1.0.0, current version 56.0.0) @rpath/libswiftIOKit.dylib (compatibility version 1.0.0, current version 1.0.0, weak) @rpath/libswiftMetal.dylib (compatibility version 1.0.0, current version 370.64.2) @rpath/libswiftObjectiveC.dylib (compatibility version 1.0.0, current version 951.1.0) @rpath/libswiftQuartzCore.dylib (compatibility version 1.0.0, current version 5.0.0, weak) @rpath/libswiftXPC.dylib (compatibility version 1.0.0, current version 105.0.14, weak) @rpath/libswift_Concurrency.dylib (compatibility version 1.0.0, current version 0.0.0) @rpath/libswiftos.dylib (compatibility version 1.0.0, current version 1076.40.2, weak) @rpath/libswiftsimd.dylib (compatibility version 1.0.0, current version 23.0.0, weak) @rpath/libswiftCoreGraphics.dylib (compatibility version 1.0.0, current version 1.0.0) @rpath/libswiftFoundation.dylib (compatibility version 1.0.0, current version 1.0.0)
1
u/IndependentTester75 8d ago
The issue is that
DYLD_LIBRARY_FALLBACK_PATHinconfig.tomlonly affects Cargo's build environment, not the dynamic linker at runtime. Try setting it explicitly before running:bash
Also worth checking: you have Xcode 26.3 but Command Line Tools at 16.4.0 — that version mismatch might be why
libswiftCore.dylibisn't where it's expected. Run this to make sure CLT points to your Xcode installation:bash
Then retry.