On Fri, 1 Sept 2023 at 23:22, Richard Purdie
<richard.pur...@linuxfoundation.org> wrote:
> > > do_compile () {
> > >     rust_runx install
> > >     rust_runx install clippy
> > >     rust_runx install rustfmt
> > > }
> > >
> > > rust_do_install() {
> > >     cp -a ${B}/_install ${D}
> >
> > ?
> >
> >
> > [adding 'rustfmt' to 'class-native' would be nice because e.g. 'bindgen'
> >  users might expect it]
>
> One potential downside is that "install" would then run outside pseudo
> context which may cause problems with permissions. I don't really know
> whether that would be an issue or not though in reality.
>
> I'd be happy to see more people working on the rust recipes. The
> challenge is the long testing cycles needed. Fancy working on some
> patches?

The original recipes in meta-rust and oe-core recipes had for a while
separate compile/install steps. At some point this regressed on a
version update - install on top of compile became broken and errored
out, but pristine install (with compile inside of it) continued to
work. This is what upstream tests and documents, so that's how rust
recipe does it as well nowadays. It's not any slower than separate
steps, actually it's somewhat faster, as install was rebuilding
supplementary things unnecessarily after compile has already done
that. The only problem I see is that it's indeed visually confusing.

If somene wants to separate the steps again, they can simply find the
commit in oe-core history and undo that. Any changes would have to
fulfil this:
1. Rust's installation procedure should run under pseudo, e.g. in
do_install. Even if it's not a problem now, it might become a problem
later.
2. The changes can't lengthen build times. Rust is already one of the
slowest items in core.
3. This probably requires fixing things in rust upstream, w.r.t.
supporting separation of build/install, and install using artefacts
from the build step properly.

Alex
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#187020): 
https://lists.openembedded.org/g/openembedded-core/message/187020
Mute This Topic: https://lists.openembedded.org/mt/101098826/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