From 2247ad36aa46df7d74c31078ab1938f974b9130f Mon Sep 17 00:00:00 2001 From: Steven Walter Date: Mon, 5 Sep 2016 15:14:19 -0400 Subject: [PATCH] README.md: link to cargo-bitbake helper program cargo-bitbake can be used to generate recipes for cargo-based rust packages. --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index c2d1cc6..a93bae4 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,19 @@ This openembedded layer provides the rust compiler, tools for building packages - rust (built for target) +## Building a rust package + +When 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](https://github.com/cardoe/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. + ## Common issues when packaging things using cargo You may run into errors similar to: