Skip to content

Commit f1037f3

Browse files
committed
doc: update readme for new class
1 parent 0cb973c commit f1037f3

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

README.md

+18-8
Original file line numberDiff line numberDiff line change
@@ -32,18 +32,25 @@ SUMMARY = "GPIO Utilities"
3232
HOMEPAGE = "git://github.com/rust-embedded/gpio-utils"
3333
LICENSE = "MIT"
3434
35-
inherit cargo
35+
inherit cargo_bin
36+
37+
# Enable network for the compile task allowing cargo to download dependencies
38+
do_compile[network] = "1"
3639
3740
SRC_URI = "git://github.com/rust-embedded/gpio-utils.git;protocol=https;branch=master"
3841
SRCREV="02b0658cd7e13e46f6b1a5de3fd9655711749759"
3942
S = "${WORKDIR}/git"
4043
LIC_FILES_CHKSUM = "file://LICENSE-MIT;md5=935a9b2a57ae70704d8125b9c0e39059"
4144
```
4245

43-
As you can see, there is almost no overhead introduced from the `cargo` class
44-
beyond simply inheriting it. The `cargo` class adds the appropriate Rust
46+
As you can see, there is almost no overhead introduced from the `cargo_bin` class
47+
beyond simply inheriting it. The `cargo_bin` class adds the appropriate Rust
4548
dependencies as well as default compile and install steps.
4649

50+
> **Warning**
51+
> In previous versions of `meta-rust-bin` the class `cargo` was used instead
52+
> of `cargo_bin`. Follow this [guide](#updating-from-an-old-meta-rust-bin) if you
53+
> are updating your `meta-rust-bin` layer from an old version.
4754
4855
## Features
4956

@@ -79,12 +86,15 @@ downloads dependencies, so add the following line to the recipe:
7986
do_compile[network] = "1"
8087
```
8188

82-
### Use with Yocto Release 3.4 (honister) and Above
89+
### Updating from an old `meta-rust-bin`
90+
91+
To avoid conflicts with the offical Rust layer of Yocto, the class `cargo` of
92+
`meta-rust-bin` was renamed to `cargo_bin`.
93+
94+
If you are updating `meta-rust-bin` from an old version please make sure to
95+
update the inherited class of your recipe to `cargo_bin`.
8396

84-
Rust is included directly in `openmbedded-core` as of Yocto version 3.4. The
85-
included recipe builds Rust components from the sources. To use binaries from
86-
the `meta-rust-bin` layer instead, set `BBMASK` to exclude the package in your
87-
configuration:
97+
After the update it's safe to remove the previously used `BBMASK`:
8898

8999
```bitbake
90100
BBMASK = "poky/meta/recipes-devtools/rust"

0 commit comments

Comments
 (0)