aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/Rust.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/markdown/Rust.md')
-rw-r--r--docs/markdown/Rust.md8
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/markdown/Rust.md b/docs/markdown/Rust.md
index b7e36e3..151aac0 100644
--- a/docs/markdown/Rust.md
+++ b/docs/markdown/Rust.md
@@ -65,3 +65,11 @@ be configured to use the file as it's not in the source root (Meson does not
write files into the source directory). [See the upstream
docs](https://rust-analyzer.github.io/manual.html#non-cargo-based-projects) for
more information on how to configure that.
+
+## Linking with standard libraries
+
+Meson will link the Rust standard libraries (e.g. libstd) statically, unless the
+target is a proc macro or dylib, or it depends on a dylib, in which case [`-C
+prefer-dynamic`](https://doc.rust-lang.org/rustc/codegen-options/index.html#prefer-dynamic)
+will be passed to the Rust compiler, and the standard libraries will be
+dynamically linked.