Rework ASSUME_PROVIDED and notes
This commit is contained in:
@@ -3,6 +3,12 @@
|
|||||||
This openembedded layer provides the rust compiler, tools for building packages
|
This openembedded layer provides the rust compiler, tools for building packages
|
||||||
(cargo), and a few example projects.
|
(cargo), and a few example projects.
|
||||||
|
|
||||||
|
By default we assume that there is a local `cargo` (ie: `cargo-native`). To disable this and try to build cargo, add:
|
||||||
|
|
||||||
|
CARGO_PROVIDED = ""
|
||||||
|
|
||||||
|
To a conf file (probably local.conf)
|
||||||
|
|
||||||
## What works:
|
## What works:
|
||||||
|
|
||||||
- MACHINE="beaglebone" (TARGET_SYS=arm-poky-linux-gnueabi)
|
- MACHINE="beaglebone" (TARGET_SYS=arm-poky-linux-gnueabi)
|
||||||
@@ -13,12 +19,16 @@ This openembedded layer provides the rust compiler, tools for building packages
|
|||||||
|
|
||||||
- Probably some of the untested things
|
- Probably some of the untested things
|
||||||
- cargo and cargo-native (use a local package for -native)
|
- cargo and cargo-native (use a local package for -native)
|
||||||
- We provide .bb files for these, and they are working every
|
|
||||||
now-and-then. Unfortunately, rust moves a bit too quickly for cargo
|
|
||||||
to keep up, and it ends up broken fairly often.
|
|
||||||
|
|
||||||
- To use a local cargo, add `ASSUME_PROVIDED = "cargo-native"` to your
|
### What about cargo?:
|
||||||
local.conf file (or use the `bitbake -I cargo-native` option)
|
|
||||||
|
We provide .bb files for these, and they are working every now-and-then.
|
||||||
|
Unfortunately, rust moves a bit too quickly for cargo to keep up, and it ends
|
||||||
|
up broken fairly often.
|
||||||
|
|
||||||
|
Very often we'll want newer versions of rust than cargo is able to build with.
|
||||||
|
Thankfully, we don't need any custom cargo configuration, and can use a vanilla
|
||||||
|
cargo binary.
|
||||||
|
|
||||||
## What's untested:
|
## What's untested:
|
||||||
|
|
||||||
|
|||||||
@@ -2,11 +2,6 @@ inherit rust
|
|||||||
|
|
||||||
CARGO = "cargo"
|
CARGO = "cargo"
|
||||||
|
|
||||||
# cargo & rust go out of sync rather frequently. Very often we'll want newer
|
|
||||||
# versions of rust than cargo is able to build with. Thankfully, we don't need
|
|
||||||
# any custom cargo configuration, and can use a vanilla cargo binary.
|
|
||||||
#
|
|
||||||
# We recommend setting ASSUME_PROVIDED += "cargo-native" in your local.conf
|
|
||||||
def cargo_base_dep(d):
|
def cargo_base_dep(d):
|
||||||
deps = ""
|
deps = ""
|
||||||
if not d.getVar('INHIBIT_DEFAULT_DEPS') and not d.getVar('INHIBIT_CARGO_DEP'):
|
if not d.getVar('INHIBIT_DEFAULT_DEPS') and not d.getVar('INHIBIT_CARGO_DEP'):
|
||||||
|
|||||||
@@ -7,3 +7,8 @@ BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend"
|
|||||||
BBFILE_COLLECTIONS += "rust-layer"
|
BBFILE_COLLECTIONS += "rust-layer"
|
||||||
BBFILE_PATTERN_rust-layer := "^${LAYERDIR}/"
|
BBFILE_PATTERN_rust-layer := "^${LAYERDIR}/"
|
||||||
BBFILE_PRIORITY_rust-layer = "7"
|
BBFILE_PRIORITY_rust-layer = "7"
|
||||||
|
|
||||||
|
# cargo generally doesn't work with the latest rust. Default to using the
|
||||||
|
# system's own cargo for cargo-native.
|
||||||
|
CARGO_PROVIDED = "cargo-native"
|
||||||
|
ASSUME_PROVIDED += "${CARGO_PROVIDED}"
|
||||||
|
|||||||
Reference in New Issue
Block a user