rustyoctobitbakeopenembedded

How can I determine what is dependent on rust in my yocto distribution?


I would like to determine what things in my kirkstone yocto distribution are dependent on rust. I am curious because building rust llvm and rust native packages take significant amount of time. Would love to eliminate these things if they are not necessary to speed up build time. And when I say "things" I mean (but not restricted to) user space applications as well as parts of the kernel such as device drivers.

How can I accomplish this?


Solution

  • It's almost definitely librsvg (a dependency of GTK) or python3-cryptography.

    The easy/hacky way is to set SKIP_RECIPE[rust-native] = "skip" and build your image, this will list what can't be built anymore.

    A better way is to dump the task dependencies as a graph to disk:

    $ bitbake --graphviz core-image-sato
    

    Then you oe-depends-dot to analyse the graph:

    $ oe-depends-dot --why --key rust-native task-depends.dot
    Because: cargo-native core-image-sato librsvg-native librsvg libstd-rs gstreamer1 gtk4 vte matchbox-terminal packagegroup-core-x11-base packagegroup-core-x11-sato gst-examples adwaita-icon-theme gtk+3 pcmanfm connman-gnome l3afpad libfm matchbox-config-gtk matchbox-desktop matchbox-keyboard matchbox-panel-2 puzzles sato-icon-theme sato-screenshot settings-daemon matchbox-session-sato
    [ ... ]
    core-image-sato -> vte -> gtk4 -> adwaita-icon-theme -> librsvg-native -> cargo-native -> rust-native
    core-image-sato -> gst-examples -> gstreamer1 -> librsvg -> libstd-rs -> cargo-native -> rust-native
    

    The common recipe here is librsvg, which is provides SVG rendering for GTK and GStreamer, and is written in Rust.

    A proper sstate solution will mean you only need to build rust once if you're on a stable release.