summaryrefslogtreecommitdiffstats
path: root/documentation
diff options
context:
space:
mode:
Diffstat (limited to 'documentation')
-rw-r--r--documentation/ref-manual/classes.rst22
1 files changed, 18 insertions, 4 deletions
diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst
index a7819d5b60..973070dfb1 100644
--- a/documentation/ref-manual/classes.rst
+++ b/documentation/ref-manual/classes.rst
@@ -266,12 +266,15 @@ manager, allowing to fetch package dependencies and build your program.
266Using this class makes it very easy to build Rust programs. All you need 266Using this class makes it very easy to build Rust programs. All you need
267is to use the :term:`SRC_URI` variable to point to a source repository 267is to use the :term:`SRC_URI` variable to point to a source repository
268which can be built by Cargo, typically one that was created by the 268which can be built by Cargo, typically one that was created by the
269``cargo new`` command, containing a ``Cargo.toml`` file and a ``src`` 269``cargo new`` command, containing a ``Cargo.toml`` file, a ``Cargo.lock`` file and a ``src``
270subdirectory. 270subdirectory.
271 271
272You will find a simple example in the 272If you want to build and package tests of the program, inherit the
273:oe_git:`rust-hello-world_git.bb </openembedded-core/tree/meta/recipes-extended/rust-example/rust-hello-world_git.bb>` 273:ref:`ref-classes-ptest-cargo` class instead of :ref:`ref-classes-cargo`.
274recipe. A more complex example, with package dependencies, is the 274
275You will find an example (that show also how to handle possible git source dependencies) in the
276:oe_git:`zvariant_3.12.0.bb </openembedded-core/tree/meta-selftest/recipes-extended/zvariant/zvariant_3.12.0.bb>`
277recipe. Another example, with only crate dependencies, is the
275:oe_git:`uutils-coreutils </meta-openembedded/tree/meta-oe/recipes-core/uutils-coreutils>` 278:oe_git:`uutils-coreutils </meta-openembedded/tree/meta-oe/recipes-core/uutils-coreutils>`
276recipe, which was generated by the `cargo-bitbake <https://crates.io/crates/cargo-bitbake>`__ 279recipe, which was generated by the `cargo-bitbake <https://crates.io/crates/cargo-bitbake>`__
277tool. 280tool.
@@ -2517,6 +2520,17 @@ the class' functionality is largely disabled unless "ptest" appears in
2517section in the Yocto Project Development Tasks Manual for more information 2520section in the Yocto Project Development Tasks Manual for more information
2518on ptest. 2521on ptest.
2519 2522
2523.. _ref-classes-ptest-cargo:
2524
2525``ptest-cargo``
2526===============
2527
2528The :ref:`ref-classes-ptest-cargo` class is a class which extends the
2529:ref:`ref-classes-cargo` class and adds ``compile_ptest_cargo`` and
2530``install_ptest_cargo`` steps to respectively build and install
2531test suites defined in the ``Cargo.toml`` file, into a dedicated
2532``-ptest`` package.
2533
2520.. _ref-classes-ptest-gnome: 2534.. _ref-classes-ptest-gnome:
2521 2535
2522``ptest-gnome`` 2536``ptest-gnome``