<commit_before>## Introduction

This openembedded layer provides the rust compiler, tools for building packages
(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:

 - MACHINE="beaglebone" (TARGET_SYS=arm-poky-linux-gnueabi)
 - Building rust-native, rust-cross, rust-hello-world, cargo-native
 - Running/using all of these (including rust-hello-world)

## What doesn't:

 - Probably some of the untested things
 - cargo and cargo-native (use a local package for -native)

### What about cargo?:

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:

 - rust (built for target)
 - Other TARGETs

## Common issues when packaging things using cargo

 You may run into errors similar to:

```
| /home/cody/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-0.0.2/src/lib.rs:12:1: 12:35 error: can't find crate for `ffi`<commit_msg>clarify readme<commit_after>## Introduction

This openembedded layer provides the rust compiler, tools for building packages
(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:

 - MACHINE="beaglebone" (TARGET_SYS=arm-poky-linux-gnueabi)
 - Building rust-native, rust-cross, rust-hello-world, cargo-native
 - Running/using all of these (including rust-hello-world)

## What doesn't:

 - Probably some of the untested things
 - cargo and cargo-native (use a local package for -native)

### What about cargo?:

We provide .bb files for cargo (-target) and cargo-native, 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.

We add "cargo-native" to ASSUME_PROVIDED unless overridden by clearing CARGO_PROVIDED (via conf/layer.conf)

## What's untested:

 - rust (built for target)
 - Other TARGETs

## Common issues when packaging things using cargo

 You may run into errors similar to:

```
| /home/cody/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-0.0.2/src/lib.rs:12:1: 12:35 error: can't find crate for `ffi`
{'fraction_non_alphanumeric': 0.0917529453766512, 'fraction_numerical': 0.013566583363084613, 'mean_word_length': 4.103825136612022, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6129798', 'n_tokens_mistral': 890, 'n_tokens_neox': 837, 'n_words': 361}