Skip to content

Commit d2a8cd9

Browse files
authored
Dynamic linking (#80)
1 parent f1db29c commit d2a8cd9

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,16 @@ Enable LTO in `Cargo.toml`:
8989
lto = true
9090
```
9191

92+
# Dynamic Linking: Why It Doesn't Work
93+
94+
![Minimum Rust: 1.0](https://img.shields.io/badge/Minimum%20Rust%20Version-1.0-brightgreen.svg)
95+
96+
Some might suggest using [`prefer-dynamic`](https://doc.rust-lang.org/rustc/codegen-options/index.html#prefer-dynamic) for smaller binaries, but this approach has critical limitations:
97+
98+
- **No stable ABI** - binaries break between Rust versions
99+
- **Deployment complexity** - requires exact library matches
100+
- **Community consensus** - static linking preferred for reliability
101+
92102
# Reduce Parallel Code Generation Units to Increase Optimization
93103

94104
[By default][cargo-profile], Cargo specifies 16 parallel codegen units for release builds.
@@ -438,4 +448,4 @@ use std::alloc::System;
438448

439449
#[global_allocator]
440450
static A: System = System;
441-
```
451+
```

0 commit comments

Comments
 (0)