OpenEmbedded/Yocto layer for Rust and Cargo
This OpenEmbedded layer provides the rust compiler, tools for building packages (cargo), and a few example projects.
rust-native
and cargo-native
rustfmt
which is used by the CI system-buildsdk
and -crosssdk
packagesWhen building a rust package in bitbake, it's usually easiest to build with cargo using cargo.bbclass. If the package already has a Cargo.toml file (most rust packages do), then it's especially easy. Otherwise you should probably get the code building in cargo first.
Once your package builds in cargo, you can use cargo-bitbake to generate a bitbake recipe for it. This allows bitbake to fetch all the necessary dependent crates, as well as a pegged version of the crates.io index, to ensure maximum reproducibility.
NOTE: You will have to edit the generated recipe based on the comments contained within it
On the host:
-sys
packages your project might need must have RDEPENDs for
the native library.On the target:
-sys
packages your project might need must have RDEPENDs for
the native library.Open a Pull Request.
The master branch supports the latest master of poky. When poky creates releases, we will create a branch with the same name as the poky release. This release branch should always work with that poky release. Note that these release branches will typically be less tested than the master branch.
All new patches against rust, rust-llvm, and cargo must have referenced upstream issues or PRs opened or an explanation why the patch cannot be upstreamed. This corresponds to the OpenEmbedded policy for other meta layers.
More info can be seen on the wiki.
MIT OR Apache-2.0 - Same as rust