Skip to content

OpenEmbedded/Yocto layer for Rust and Cargo

License

Notifications You must be signed in to change notification settings

zuma-array/meta-rust

This branch is 216 commits ahead of, 83 commits behind meta-rust/meta-rust:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

aff3231 · Feb 9, 2024
Aug 5, 2021
Jan 2, 2024
Dec 15, 2022
Dec 15, 2022
Mar 20, 2023
Dec 29, 2022
Feb 9, 2024
Nov 2, 2022
Nov 3, 2017
Nov 3, 2016
Oct 25, 2014
Dec 2, 2017
Aug 10, 2022

Repository files navigation

Introduction

This OpenEmbedded layer provides the rust compiler, tools for building packages (cargo), and a few example projects.

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 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

Pitfalls

  • TARGET_SYS must be different from BUILD_SYS. This is due to the way Rust configuration options are tracked for different targets. This is the reason we use the Yocto triples instead of the native Rust triples. See rust-lang/cargo#3349.

Dependencies

On the host:

  • Any -sys packages your project might need must have RDEPENDs for the native library.

On the target:

  • Any -sys packages your project might need must have RDEPENDs for the native library.

Maintainer(s) & Patch policy

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.

Copyright

MIT OR Apache-2.0 - Same as rust

About

OpenEmbedded/Yocto layer for Rust and Cargo

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • BitBake 51.3%
  • Shell 13.0%
  • SourcePawn 11.9%
  • Python 11.8%
  • C++ 8.7%
  • PHP 1.9%
  • Other 1.4%