-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
layers/meta-opentrons: add rust 1.71.1
Or more specifically cargo and everything that depends on, since maturin uses cargo.toml features that need a new version
- Loading branch information
Showing
24 changed files
with
4,419 additions
and
0 deletions.
There are no files selected for viewing
437 changes: 437 additions & 0 deletions
437
layers/meta-opentrons/classes/rust-target-config.bbclass
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
layers/meta-opentrons/recipes-devtools/rust/README-rust.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
## Introduction | ||
|
||
This 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](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. Once the Rust SDK support is added to oe-core, cargo-bitbake | ||
may also be added to the SDK. | ||
|
||
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. | ||
|
453 changes: 453 additions & 0 deletions
453
layers/meta-opentrons/recipes-devtools/rust/cargo-c-crates.inc
Large diffs are not rendered by default.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
layers/meta-opentrons/recipes-devtools/rust/cargo-c-native_0.9.18.bb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
SUMMARY = "cargo applet to build and install C-ABI compatible dynamic and static libraries." | ||
HOMEPAGE = "https://crates.io/crates/cargo-c" | ||
LICENSE = "MIT" | ||
LIC_FILES_CHKSUM = " \ | ||
file://LICENSE;md5=384ed0e2e0b2dac094e51fbf93fdcbe0 \ | ||
" | ||
|
||
|
||
SRC_URI = " \ | ||
git://github.com/lu-zero/cargo-c.git;branch=master;protocol=https \ | ||
file://0001-Add-Cargo.lock-file.patch \ | ||
" | ||
UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.*)" | ||
|
||
SRCREV = "4eaf39ebbbc9ab8f092adf487d5b53435511d619" | ||
S = "${WORKDIR}/git" | ||
|
||
inherit cargo cargo-update-recipe-crates pkgconfig native | ||
|
||
DEPENDS = "openssl curl" | ||
|
||
require ${BPN}-crates.inc | ||
|
Oops, something went wrong.