You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+46-4Lines changed: 46 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -53,15 +53,57 @@ A simple standalone webserver which you can upload and download files from.
53
53
curl -X POST --data-binary @file_to_upload.txt http://localhost:8000/file_to_upload.txt
54
54
55
55
56
-
# Statically-Linked Binary
56
+
# Statically-Linked Linux Binary
57
57
58
-
The following commands build a statically-linked Linux binary without shared library dependencies. This can be useful for embedded systems or other applications where you do not want to rely on libgcc, libc, libpthread, and other dependencies which can break due to version changes. Note that performance may be lower than the dynamically-linked binaries described above.
58
+
The following commands build a statically-linked Linux binary without shared library dependencies. This can be useful when distributing the binary to multiple different Linux distributions or to different versions of a Linux distribution, since libgcc, libc, libpthread, and other dependencies can break due to version changes.
59
59
60
-
1. Add musl toolchain
60
+
```
61
+
/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found
62
+
(required by ./uploadserver-x86_64-linux)
63
+
```
64
+
65
+
Note that performance may be lower than the dynamically-linked binaries described above.
1. Install the latest version of Xcode from the App Store, or an older XCode version from [Apple Developer Downloads](https://developer.apple.com/download/all/).
79
+
80
+
2. Switch to the specified Xcode version if necessary:
# TODO: Support ARM Apple Silicon (M1 processor family)
96
+
Requires MacOS Catalina 10.15.4 (Intel-based Mac) or MacOS Big Sur 11 (Apple Silicon Mac) or later.
97
+
98
+
Xcode 12.2 and later is a requirement for building universal binaries. Earlier versions of Xcode don't contain the support needed to build and test universal versions of MacOS code.
99
+
100
+
-[Github: Cargo-Lipo](https://github.com/TimNN/cargo-lipo) can automatically create universal libraries (fat binaries supporting both Intel x86_64 processors and Apple Silicon) for iOS and Mac.
-[Stack Overflow: How do I cross compile a Rust application from macOS x86 to macOS Silicon?](https://stackoverflow.com/questions/66849112/how-do-i-cross-compile-a-rust-application-from-macos-x86-to-macos-silicon)
-[Rust-Lang Users: Compile rust binary for older versions of Mac OSX](https://users.rust-lang.org/t/compile-rust-binary-for-older-versions-of-mac-osx/38695/6)
108
+
-[William Saar's Blog: Shipping Linux binaries that don't break with Rust](https://saarw.github.io/dev/2020/06/18/shipping-linux-binaries-that-dont-break-with-rust.html)
109
+
-[The World Aflame: Cross-compiling a simple Rust web app](https://www.andrew-thorburn.com/cross-compiling-a-simple-rust-web-app/)
0 commit comments