summaryrefslogtreecommitdiff
path: root/docs/markdown
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-02-04 17:53:44 +0100
committerDylan Baker <dylan@pnwbakers.com>2025-07-18 09:42:56 -0700
commitff963e657cf1151cf002efc123563cb40dabab11 (patch)
tree99fde408ecc91fe6887a093e4a892f5a86cdd381 /docs/markdown
parent08798850c1c2798e55fe7099cbff231e48d52e42 (diff)
downloadmeson-ff963e657cf1151cf002efc123563cb40dabab11.tar.gz
rust: add rust_dynamic_std option
As an initial implementation, simply adding "-C prefer-dynamic" works for binary crates (as well as dylib and proc-macro that already used it). In the future this could be extended to other crate types. For more information see the comment in the changed file, as well as https://github.com/mesonbuild/meson/issues/8828 and https://github.com/mesonbuild/meson/issues/14215. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'docs/markdown')
-rw-r--r--docs/markdown/Builtin-options.md1
-rw-r--r--docs/markdown/snippets/rust-dynamic-std.md7
2 files changed, 8 insertions, 0 deletions
diff --git a/docs/markdown/Builtin-options.md b/docs/markdown/Builtin-options.md
index 7a4d7f0ba..c23eaae3a 100644
--- a/docs/markdown/Builtin-options.md
+++ b/docs/markdown/Builtin-options.md
@@ -303,6 +303,7 @@ or compiler being used:
| cpp_thread_count | 4 | integer value ≥ 0 | Number of threads to use with emcc when using threads |
| cpp_winlibs | see below | free-form comma-separated list | Standard Windows libs to link against |
| fortran_std | none | [none, legacy, f95, f2003, f2008, f2018] | Fortran language standard to use |
+| rust_dynamic_std | false | true, false | Whether to link dynamically to the Rust standard library *(Added in 1.9.0)* |
| cuda_ccbindir | | filesystem path | CUDA non-default toolchain directory to use (-ccbin) *(Added in 0.57.1)* |
The default values of `c_winlibs` and `cpp_winlibs` are in
diff --git a/docs/markdown/snippets/rust-dynamic-std.md b/docs/markdown/snippets/rust-dynamic-std.md
new file mode 100644
index 000000000..ac4e8a7ea
--- /dev/null
+++ b/docs/markdown/snippets/rust-dynamic-std.md
@@ -0,0 +1,7 @@
+## New experimental option `rust_dynamic_std`
+
+A new option `rust_dynamic_std` can be used to link Rust programs so
+that they use a dynamic library for the Rust `libstd`.
+
+Right now, `staticlib` crates cannot be produced if `rust_dynamic_std` is
+true, but this may change in the future.