Re: [OE-core] [RFC PATCH 1/2] cargo-update-recipe-crates.bbclass: add a class to generate SRC_URI crate lists from Cargo.lock

2022-10-12 Thread Tim Orling
On Wed, Oct 5, 2022 at 1:56 AM Alexander Kanavin wrote: > On Wed, 5 Oct 2022 at 07:32, Chuck Wolber wrote: > > Can you elaborate on this? > > > > I only ask because we are using this[1] and this[2] to build this[3] > recipe for hardknott. > > > > 1.

Re: [OE-core] [RFC PATCH 1/2] cargo-update-recipe-crates.bbclass: add a class to generate SRC_URI crate lists from Cargo.lock

2022-10-05 Thread Alexander Kanavin
On Wed, 5 Oct 2022 at 07:32, Chuck Wolber wrote: > Can you elaborate on this? > > I only ask because we are using this[1] and this[2] to build this[3] recipe > for hardknott. > > 1. https://github.com/meta-rust/meta-rust/blob/master/lib/crate.py > 2. https://crates.io/crates/cargo-bitbake > 3.

Re: [OE-core] [RFC PATCH 1/2] cargo-update-recipe-crates.bbclass: add a class to generate SRC_URI crate lists from Cargo.lock

2022-10-04 Thread Chuck Wolber
On Fri, Sep 30, 2022 at 10:55 AM Alexander Kanavin wrote: %> Snip %< > On the other hand, bitbake does not use cargo (and quite possible > won't ever be able to), > Can you elaborate on this? I only ask because we are using this[1] and this[2] to build this[3] recipe for hardknott. 1.

Re: [OE-core] [RFC PATCH 1/2] cargo-update-recipe-crates.bbclass: add a class to generate SRC_URI crate lists from Cargo.lock

2022-10-04 Thread Alexander Kanavin
On Mon, 3 Oct 2022 at 10:09, Quentin Schulz wrote: > > +def get_crates(f): > > +import tomllib > > +c_list = 'SRC_URI += " \\ \n' > > +crates = tomllib.load(open(f, 'rb')) > > Aren't we supposed to use context for this or close the file descriptor > after opening it manually? > > e.g.

Re: [OE-core] [RFC PATCH 1/2] cargo-update-recipe-crates.bbclass: add a class to generate SRC_URI crate lists from Cargo.lock

2022-10-03 Thread Quentin Schulz via lists.openembedded.org
Hi Alex, On 9/30/22 19:55, Alexander Kanavin wrote: For better or worse, more and more rust components are appearing that do not include their dependencies in tarballs (or git trees), and rely on cargo to fetch them. On the other hand, bitbake does not use cargo (and quite possible won't ever

[OE-core] [RFC PATCH 1/2] cargo-update-recipe-crates.bbclass: add a class to generate SRC_URI crate lists from Cargo.lock

2022-09-30 Thread Alexander Kanavin
For better or worse, more and more rust components are appearing that do not include their dependencies in tarballs (or git trees), and rely on cargo to fetch them. On the other hand, bitbake does not use cargo (and quite possible won't ever be able to), and relies on having each item explicitly