Re: [RFC v3 13/32] rust: use vendored-sources

2021-09-13 Thread Paolo Bonzini
On 09/09/21 18:29, Marc-André Lureau wrote:  * C doesn't have a package manager, so if we need a dependency that    distros don't ship then we need to wrap it up and provide it ourselves Have we considered meson wrap? I never really looked at it in detail, not sure if that would

Re: [RFC v3 13/32] rust: use vendored-sources

2021-09-09 Thread Ian Jackson
Daniel P. Berrangé writes ("Re: [RFC v3 13/32] rust: use vendored-sources"): > On Thu, Sep 09, 2021 at 08:29:58PM +0400, Marc-André Lureau wrote: > > True, at least on Fedora, there is machinery to package "regular" Rust > > programs/crates in an automated way.

Re: [RFC v3 13/32] rust: use vendored-sources

2021-09-09 Thread Ian Jackson
Daniel P. Berrangé writes ("Re: [RFC v3 13/32] rust: use vendored-sources"): > Yes, distros do have machinery for this, although it is often > hard to fit in with it when you have a mixed language project. > Their machinery typically assumes pure single language project, &g

Re: [RFC v3 13/32] rust: use vendored-sources

2021-09-09 Thread Daniel P . Berrangé
On Thu, Sep 09, 2021 at 08:29:58PM +0400, Marc-André Lureau wrote: > Hi > > On Thu, Sep 9, 2021 at 8:04 PM Peter Maydell > wrote: > > > On Tue, 7 Sept 2021 at 13:32, wrote: > > > > > > From: Marc-André Lureau > > > > > > Most likely, QEMU will want tighter control over the sources, rather > >

Re: [RFC v3 13/32] rust: use vendored-sources

2021-09-09 Thread Daniel P . Berrangé
On Thu, Sep 09, 2021 at 05:02:01PM +0100, Peter Maydell wrote: > On Tue, 7 Sept 2021 at 13:32, wrote: > > > > From: Marc-André Lureau > > > > Most likely, QEMU will want tighter control over the sources, rather > > than relying on crates.io downloading, use a git submodule with all the > >

Re: [RFC v3 13/32] rust: use vendored-sources

2021-09-09 Thread Marc-André Lureau
Hi On Thu, Sep 9, 2021 at 8:04 PM Peter Maydell wrote: > On Tue, 7 Sept 2021 at 13:32, wrote: > > > > From: Marc-André Lureau > > > > Most likely, QEMU will want tighter control over the sources, rather > > than relying on crates.io downloading, use a git submodule with all the > >

Re: [RFC v3 13/32] rust: use vendored-sources

2021-09-09 Thread Peter Maydell
On Tue, 7 Sept 2021 at 13:32, wrote: > > From: Marc-André Lureau > > Most likely, QEMU will want tighter control over the sources, rather > than relying on crates.io downloading, use a git submodule with all the > dependencies. However, cargo --offline was added in 1.36. > > "cargo vendor" helps

Re: [RFC v3 13/32] rust: use vendored-sources

2021-09-08 Thread Marc-André Lureau
Hi On Wed, Sep 8, 2021 at 8:51 PM Ian Jackson wrote: > Marc-André Lureau writes ("Re: [RFC v3 13/32] rust: use vendored-sources"): > > Yes, this is the shim to provide a C ABI QMP handler from Rust. This is > where > > all the FFI<->Rust conversion takes pla

Re: [RFC v3 13/32] rust: use vendored-sources

2021-09-08 Thread Ian Jackson
Marc-André Lureau writes ("Re: [RFC v3 13/32] rust: use vendored-sources"): > Yes, this is the shim to provide a C ABI QMP handler from Rust. This is where > all the FFI<->Rust conversion takes place. > > The "safe" code is qga/qmp/vcpus.rs. However, there i

Re: [RFC v3 13/32] rust: use vendored-sources

2021-09-08 Thread Marc-André Lureau
Hi On Wed, Sep 8, 2021 at 8:29 PM Ian Jackson wrote: > Marc-André Lureau writes ("Re: [RFC v3 13/32] rust: use vendored-sources"): > > You can start by reading `cargo doc -p common --open`. The generated > > code needs some environment variables set, so `cargo doc -p

Re: [RFC v3 13/32] rust: use vendored-sources

2021-09-08 Thread Ian Jackson
Marc-André Lureau writes ("Re: [RFC v3 13/32] rust: use vendored-sources"): > You can start by reading `cargo doc -p common --open`. The generated > code needs some environment variables set, so `cargo doc -p qga` > will fail unless you set the environment variable > &

Re: [RFC v3 13/32] rust: use vendored-sources

2021-09-08 Thread Ian Jackson
Marc-André Lureau writes ("Re: [RFC v3 13/32] rust: use vendored-sources"): > On Wed, Sep 8, 2021 at 7:55 PM Ian Jackson wrote: > > git submodules are just awful IMO. > > Yes, but it's often (always?) the user fault. I must disagree in the strongest possible te

Re: [RFC v3 13/32] rust: use vendored-sources

2021-09-08 Thread Peter Maydell
On Wed, 8 Sept 2021 at 17:17, Marc-André Lureau wrote: > > Hi > > On Wed, Sep 8, 2021 at 7:55 PM Ian Jackson wrote: >> >> Marc-André Lureau writes ("Re: [RFC v3 13/32] rust: use vendored-sources"): >> > Hmm, I do "cargo vendor --version

Re: [RFC v3 13/32] rust: use vendored-sources

2021-09-08 Thread Marc-André Lureau
Hi On Wed, Sep 8, 2021 at 7:40 PM Ian Jackson wrote: > marcandre.lur...@redhat.com writes ("[RFC v3 13/32] rust: use > vendored-sources"): > > Most likely, QEMU will want tighter control over the sources, rather > > than relying on crates.io downloading,

Re: [RFC v3 13/32] rust: use vendored-sources

2021-09-08 Thread Marc-André Lureau
Hi On Wed, Sep 8, 2021 at 7:55 PM Ian Jackson wrote: > Marc-André Lureau writes ("Re: [RFC v3 13/32] rust: use vendored-sources"): > > Hmm, I do "cargo vendor --versioned-dirs ../rust/vendored" to vendor > crates. > > > > It seems cc was updated, a

Re: [RFC v3 13/32] rust: use vendored-sources

2021-09-08 Thread Ian Jackson
Marc-André Lureau writes ("Re: [RFC v3 13/32] rust: use vendored-sources"): > Hmm, I do "cargo vendor --versioned-dirs ../rust/vendored" to vendor crates. > > It seems cc was updated, and I didn't update the submodule accordingly. For > reference, this is th

Re: [RFC v3 13/32] rust: use vendored-sources

2021-09-08 Thread Marc-André Lureau
Hi On Wed, Sep 8, 2021 at 7:40 PM Ian Jackson wrote: > marcandre.lur...@redhat.com writes ("[RFC v3 13/32] rust: use > vendored-sources"): > > Most likely, QEMU will want tighter control over the sources, rather > > than relying on crates.io downloading,

Re: [RFC v3 13/32] rust: use vendored-sources

2021-09-08 Thread Ian Jackson
marcandre.lur...@redhat.com writes ("[RFC v3 13/32] rust: use vendored-sources"): > Most likely, QEMU will want tighter control over the sources, rather > than relying on crates.io downloading, use a git submodule with all the > dependencies. However, cargo --offline was

[RFC v3 13/32] rust: use vendored-sources

2021-09-07 Thread marcandre . lureau
From: Marc-André Lureau Most likely, QEMU will want tighter control over the sources, rather than relying on crates.io downloading, use a git submodule with all the dependencies. However, cargo --offline was added in 1.36. "cargo vendor" helps gathering and updating the dependencies.