All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Opdenacker <michael.opdenacker@bootlin.com>
To: Alex Kiernan <alex.kiernan@gmail.com>
Cc: docs@lists.yoctoproject.org, Alexander Kanavin <alex.kanavin@gmail.com>
Subject: Re: [docs] [PATCH] ref-manual: document Rust classes
Date: Mon, 16 Jan 2023 18:18:20 +0100	[thread overview]
Message-ID: <6c8a96b9-8000-723e-e39a-c8ee3d13cc98@bootlin.com> (raw)
In-Reply-To: <CAO5Uq5TgP2N0fhR_zPpK4FBzZ6RO67tqiSOYWDsyS2wbfAfuNw@mail.gmail.com>

Hi Alex,

On 15.01.23 at 21:03, Alex Kiernan wrote:
> On Fri, Jan 13, 2023 at 6:09 PM Michael Opdenacker via
> lists.yoctoproject.org
> <michael.opdenacker=bootlin.com@lists.yoctoproject.org> wrote:
>> From: Michael Opdenacker <michael.opdenacker@bootlin.com>
>>
>> Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
>> ---
>>   documentation/ref-manual/classes.rst | 54 ++++++++++++++++++++++++++++
>>   1 file changed, 54 insertions(+)
>>
>> diff --git a/documentation/ref-manual/classes.rst b/documentation/ref-manual/classes.rst
>> index 0cb507b500..cc6ba04bff 100644
>> --- a/documentation/ref-manual/classes.rst
>> +++ b/documentation/ref-manual/classes.rst
>> @@ -254,6 +254,42 @@ When inherited globally, prints statistics at the end of the build on
>>   sstate re-use. In order to function, this class requires the
>>   :ref:`ref-classes-buildstats` class be enabled.
>>
>> +.. _ref-classes-cargo:
>> +
>> +``cargo``
>> +=========
>> +
>> +The :ref:`ref-classes-cargo` class allows to compile Rust language programs
>> +using `Cargo <https://doc.rust-lang.org/cargo/>`__. Cargo is Rust's package
>> +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 an ``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
>> +: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.
>> +
> We should reference `cargo-update-recipe-crates` here rather than
> `cargo bitbake`. The flow for creating a recipe then goes something
> like (using hippotat as an example
> https://www.chiark.greenend.org.uk/~ianmdlvl/hippotat/current/docs/):
>
> devtool add -S a6ac94b4922602af64f22b86ba5347ad95fcda44 -V 1.1.7
> hippotat https://salsa.debian.org/iwj/hippotat.git
> # edit resulting recipe delete boiler plate tasks and add `inherit
> cargo cargo-update-recipe-crates`
> bitbake -c update_crates hippotat
> # edit recipe to add `require ${BPN}-crates.inc`
> devtool build hippotat
> # fix resulting errors (add `DEPENDS += "openssl"`, `inherit
> pkgconfig` in this case)
> devtool build hippotat


Thanks for the review and suggestion. I overlooked this class so I will 
mention it in the docs, as well as the example you gave.
Thanks again
Cheers
Michael.

-- 
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



  parent reply	other threads:[~2023-01-16 17:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-13 18:09 [PATCH] ref-manual: document Rust classes michael.opdenacker
2023-01-15 20:03 ` [docs] " Alex Kiernan
2023-01-15 20:09   ` Alexander Kanavin
2023-01-16 17:18   ` Michael Opdenacker [this message]
2023-01-16 19:30     ` Alex Kiernan
2023-02-02 18:06   ` Michael Opdenacker
2023-02-03  9:42     ` Michael Opdenacker
2023-02-03 12:06       ` Alex Kiernan
2023-02-03 17:32         ` Michael Opdenacker
2023-01-16  7:35 ` Ulrich Ölmann
2023-01-16 16:05   ` Michael Opdenacker
2023-01-16 16:15     ` Richard Purdie
     [not found]     ` <173AD6377FCD14EA.23170@lists.yoctoproject.org>
2023-01-16 16:34       ` Richard Purdie
2023-01-16 17:08         ` 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=6c8a96b9-8000-723e-e39a-c8ee3d13cc98@bootlin.com \
    --to=michael.opdenacker@bootlin.com \
    --cc=alex.kanavin@gmail.com \
    --cc=alex.kiernan@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.