public inbox for docs@lists.yoctoproject.org
 help / color / mirror / Atom feed
From: frederic.martinsons@gmail.com
To: docs@lists.yoctoproject.org
Cc: Frederic Martinsons <frederic.martinsons@gmail.com>
Subject: [PATCH] ref-manual: classes.rst: suppress rust-hello-world reference and ptest-cargo class
Date: Wed,  2 Aug 2023 15:23:52 +0200	[thread overview]
Message-ID: <20230802132352.95244-1-frederic.martinsons@gmail.com> (raw)

From: Frederic Martinsons <frederic.martinsons@gmail.com>

Signed-off-by: Frederic Martinsons <frederic.martinsons@gmail.com>
---
 documentation/ref-manual/classes.rst | 20 ++++++++++++++++----
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst
index e555a80b5..950231f40 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.
 Using this class makes it very easy to build Rust programs. All you need
 is to use the :term:`SRC_URI` variable to point to a source repository
 which can be built by Cargo, typically one that was created by the
-``cargo new`` command, containing a ``Cargo.toml`` file and a ``src``
+``cargo new`` command, containing a ``Cargo.toml`` file, a ``Cargo.lock`` file and a ``src``
 subdirectory.
 
-You will find a simple example in the
-:oe_git:`rust-hello-world_git.bb </openembedded-core/tree/meta/recipes-extended/rust-example/rust-hello-world_git.bb>`
-recipe. A more complex example, with package dependencies, is the
+If you want to build and package tests of the program, replace :ref:`ref-classes-cargo`
+inheritance by :ref:`ref-classes-ptest-cargo` one.
+
+You will find an example (that show also how to handle possible git source dependencies) in the
+:oe_git:`zvariant_3.12.0.bb </openembedded-core/tree/meta-selftest/recipes-extended/zvariant/zvariant_3.12.0.bb>`
+recipe. Another example, with only crates dependencies, is the
 :oe_git:`uutils-coreutils </meta-openembedded/tree/meta-oe/recipes-core/uutils-coreutils>`
 recipe, which was generated by the `cargo-bitbake <https://crates.io/crates/cargo-bitbake>`__
 tool.
@@ -290,6 +293,15 @@ An exception is the "rust" recipe, to build the Rust compiler and runtime
 library, which is built by Cargo but cannot use the :ref:`ref-classes-cargo`
 class. This is why this class was introduced.
 
+.. _ref-classes-ptest-cargo:
+
+``ptest_cargo``
+===============
+
+The :ref:`ref-classes-ptest-cargo` class is a class which extend :ref:`ref-classes-cargo`
+and add a compile_ptest_cargo/install_ptest_cargo steps to respectively build and install
+test suites defined in ``Cargo.toml`` file in a dedicate -ptest package.
+
 .. _ref-classes-ccache:
 
 .. _ref-classes-cargo-update-recipe-crates:
-- 
2.34.1



             reply	other threads:[~2023-08-02 13:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-02 13:23 frederic.martinsons [this message]
2023-08-02 14:45 ` [docs] [PATCH] ref-manual: classes.rst: suppress rust-hello-world reference and ptest-cargo class Michael Opdenacker
2023-08-02 14:51   ` Frédéric Martinsons
2023-08-02 14:55     ` Michael Opdenacker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230802132352.95244-1-frederic.martinsons@gmail.com \
    --to=frederic.martinsons@gmail.com \
    --cc=docs@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox