[OE-core] [RFC][PATCH 0/3] Move rust from meta-rust to oe-core

Adrian Bunk bunk at stusta.de
Tue Sep 24 10:18:23 UTC 2019


On Mon, Sep 23, 2019 at 10:45:05PM -0400, Randy MacLeod wrote:
> I moved the Rust support from meta-rust to oe-core.
> 
> As you'd expect, it's still building rust-hello-world for all qemus 
> (except riscv64 which may never have worked). 
> Rust-hello-world runs for me on qemu:
>    x86-64, arm, arm64
> It may run on other machines but that's what I've tested so far.
> 
> We need a list of meta-rust issues that should be resolved 
> in order to get the code accepted in oe-core. I opened an issue 
> to track that:
>    https://github.com/meta-rust/meta-rust/issues/251
> but there haven't been any comments yet. I'd rather track
> issues in github than in the YP Bugzilla:
>   https://bugzilla.yoctoproject.org/show_bug.cgi?id=12675
> 
> Here, in no particular order, are some of
> the defects that I believe need to be fixed:
> 
> 1. build system is assumed to be linux-x86_64
>    https://github.com/meta-rust/meta-rust/issues/23
> 
> 2. Make rust-native build in parallel (it's very slow!)
>    (meta-rust issue/PR to be created by Randy)
> 
> 3. Document developer workflows such as cargo-bitbake.

Is there consensus on how libraries should be handled in general for 
various ecosystems?

Precedent with C, Python and Perl are recipes for each library,
but vendoring seems to be a popular option now.

There are also related topics like how to provide security support
for vendored libraries - this is the main reason why vendored libraries
shipped by upstream are rarely used by distributions in the C ecosystem.

> 4. Build offline ( BB_NO_NETWORK = '1' )
> 
> 5. make rust-hello-world install for qemuriscv64
>    https://github.com/meta-rust/meta-rust/issues/252

LLVM in meta-rust is too old for RISC-V.

Using an own LLVM recipe might makes sense for an external layer, but in 
oe-core the llvm recipe that is already there should be used instead of 
another copy of LLVM.

> 6. ... build rustc and cargo for target (nice to have, only).
>    https://github.com/meta-rust/meta-rust/issues/81
> 
> 7. Bootstrap from C as an option?
>    See: https://bugzilla.yoctoproject.org/show_bug.cgi?id=12675#c2
> 
> 8. Update librsvg to latest (2.46) which uses rust.

2.44 built for me a few months ago with meta-rust.

> What have I missed?
>...

9. Ensure that there are no non-optional dependencies on the target
   librsvg since users will build for targets not supported by Rust.
   The one in webkitgtk seems to be optional or obsolete.

10. Review the whole contents of the layer.
    There are several things where I hope there are better solutions,
    and I expect that what will land in oe-core will look quite 
    different from the current meta-rust.
    See item 5 above for an example.

> ../Randy
>...

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed



More information about the Openembedded-core mailing list