summaryrefslogtreecommitdiff
path: root/docs/markdown
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2024-03-07 12:23:13 -0500
committerXavier Claessens <xclaesse@gmail.com>2024-06-14 15:59:42 -0400
commit9b8378985dbdc0112d11893dd42b33b7bc8d1e62 (patch)
tree30562084d1742491af1b044d5234ceddfe0daffa /docs/markdown
parentc0de2e12645b621793c62d4e2da17dc9541946f8 (diff)
downloadmeson-9b8378985dbdc0112d11893dd42b33b7bc8d1e62.tar.gz
cargo: Load Cargo.lock
Cargo.lock is essentially identical to subprojects/*.wrap files. When a (sub)project has a Cargo.lock file this allows automatic fallback for its cargo dependencies.
Diffstat (limited to 'docs/markdown')
-rw-r--r--docs/markdown/Wrap-dependency-system-manual.md4
-rw-r--r--docs/markdown/snippets/cargo_lock.md6
2 files changed, 10 insertions, 0 deletions
diff --git a/docs/markdown/Wrap-dependency-system-manual.md b/docs/markdown/Wrap-dependency-system-manual.md
index 5f0b473e7..3983d2877 100644
--- a/docs/markdown/Wrap-dependency-system-manual.md
+++ b/docs/markdown/Wrap-dependency-system-manual.md
@@ -377,6 +377,10 @@ Some naming conventions need to be respected:
- The `extra_deps` variable is pre-defined and can be used to add extra dependencies.
This is typically used as `extra_deps += dependency('foo')`.
+Since *1.5.0* Cargo wraps can also be provided with `Cargo.lock` file at the root
+of (sub)project source tree. Meson will automatically load that file and convert
+it into a serie of wraps definitions.
+
## Using wrapped projects
Wraps provide a convenient way of obtaining a project into your
diff --git a/docs/markdown/snippets/cargo_lock.md b/docs/markdown/snippets/cargo_lock.md
new file mode 100644
index 000000000..e38c5ed35
--- /dev/null
+++ b/docs/markdown/snippets/cargo_lock.md
@@ -0,0 +1,6 @@
+## Added support `Cargo.lock` file
+
+When a (sub)project has a `Cargo.lock` file at its root, it is loaded to provide
+an automatic fallback for dependencies it defines, fetching code from
+https://crates.io or git. This is identical as providing `subprojects/*.wrap`,
+see [cargo wraps](Wrap-dependency-system-manual.md#cargo-wraps) dependency naming convention.