Am 12.02.2025 um 18:48 schrieb Frédéric Martinsons:


Le mer. 12 févr. 2025, 17:29, Stefan Herbrechtsmeier <stefan.herbrechtsmeier-...@weidmueller.com> a écrit :

    Am 12.02.2025 um 13:45 schrieb Frédéric Martinsons:

    On Tue, 11 Feb 2025 at 16:01, Stefan Herbrechtsmeier via
    lists.openembedded.org <http://lists.openembedded.org>
    <stefan.herbrechtsmeier-oss=weidmueller....@lists.openembedded.org>
    wrote:

        From: Stefan Herbrechtsmeier
        <stefan.herbrechtsme...@weidmueller.com>

        Add a vendor module for cargo to resolve dependencies and
        populate
        vendor directories from a Cargo.lock file.



    Hello,

    Have you looked at vendor subcommand of cargo :
    https://doc.rust-lang.org/cargo/commands/cargo-vendor.html ?
    I didn't read the series but the commit message makes me think
    that "cargo vendor" already exists for resolving dependencies
    and populating a vendor directory.

    The class uses the bitbake fetcher (wget / git) to create a vendor
    directory and emulate the cargo vendor command.


Yes, I understood that. Let me rephrase my question.
Is it desirable/needed to mimick an existing (upstream and maintained) command, considering that we already use native cargo to build rust binaries?
We already mimick the cargo vendor command. But at the moment the code is hidden inside the crate fetcher.

We need to bypass the download of crates via cargo to support download mirrors and offline build. Therefore we download the files via wget and populate a local crate repository.

Is the new flow you suggest can use the "cargo vendor" call?

It is useless because we already create a vendor folder manual (CARGO_VENDORING_DIRECTORY).

Maybe there is room for less custom code here. Sorry if I missed something obvious, I just react to some keywords in area that I contributed 2 years ago.

I mainly extend existing code from crate fetcher and cargo-update-recipe-crate class. We need to extract download information from the lock file to create SRC_URIs.
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#211307): 
https://lists.openembedded.org/g/openembedded-core/message/211307
Mute This Topic: https://lists.openembedded.org/mt/111123523/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to