diff options
| author | Dario Nieuwenhuis <[email protected]> | 2021-03-29 21:46:51 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2021-03-29 21:46:51 +0200 |
| commit | 4371302da87f7fad4649c0ef4eade9432dc94529 (patch) | |
| tree | d09f2b75e7e116e6e96f4233c16cca47efbc20b3 | |
| parent | 02ae53e71ba034268d929bcbaa359200fcb34690 (diff) | |
Remove workspace Cargo.toml, add template
| -rw-r--r-- | .github/workflows/rust.yml | 6 | ||||
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | Cargo.example.toml | 75 | ||||
| -rw-r--r-- | Cargo.toml | 58 |
4 files changed, 78 insertions, 62 deletions
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d1a7ade0b..178ccf89c 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml | |||
| @@ -81,10 +81,8 @@ jobs: | |||
| 81 | with: | 81 | with: |
| 82 | path: target | 82 | path: target |
| 83 | key: ${{ runner.os }}-${{ matrix.target }} | 83 | key: ${{ runner.os }}-${{ matrix.target }} |
| 84 | - uses: actions-rs/cargo@v1 | 84 | - name: Check |
| 85 | with: | 85 | run: cd ${{ matrix.package }} && cargo check --features=${{ matrix.features }} --target=${{ matrix.target }} |
| 86 | command: check | ||
| 87 | args: --package ${{ matrix.package }} --features=${{ matrix.features }} --target=${{ matrix.target }} | ||
| 88 | 86 | ||
| 89 | fmt: | 87 | fmt: |
| 90 | runs-on: ubuntu-latest | 88 | runs-on: ubuntu-latest |
diff --git a/.gitignore b/.gitignore index 784c6bac0..893a87368 100644 --- a/.gitignore +++ b/.gitignore | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | target | 1 | target |
| 2 | Cargo.lock | 2 | Cargo.lock |
| 3 | third_party | 3 | third_party |
| 4 | /Cargo.toml \ No newline at end of file | ||
diff --git a/Cargo.example.toml b/Cargo.example.toml new file mode 100644 index 000000000..c946a460d --- /dev/null +++ b/Cargo.example.toml | |||
| @@ -0,0 +1,75 @@ | |||
| 1 | # This file is a template for a Cargo workspace for developer convenience. | ||
| 2 | # | ||
| 3 | # Since Cargo resolves all features for all crates in the workspace together, | ||
| 4 | # it is not possible to have a workspace with all the crates together, since they | ||
| 5 | # enable incompatible features. For example, nrf crates enable embassy-macros/nrf | ||
| 6 | # and stm32 crates enable embassy-macros/stm32. embassy-macros doesn't support having | ||
| 7 | # both of these features on at the same time, because it makes no sense. | ||
| 8 | # | ||
| 9 | # Instead, we provide this template so you can enable only the crates you're going to | ||
| 10 | # work on. This makes eg rust-analyzer check-on-save and autocomplete work, but only | ||
| 11 | # in these crates, without any feature conflict. | ||
| 12 | # | ||
| 13 | # Copy this file to `Cargo.toml` and uncomment one group of crates below. | ||
| 14 | # | ||
| 15 | # `/Cargo.toml` is already in .gitignore, so you don't commit it accidentally. | ||
| 16 | |||
| 17 | [workspace] | ||
| 18 | members = [ | ||
| 19 | "embassy", | ||
| 20 | "embassy-traits", | ||
| 21 | "embassy-macros", | ||
| 22 | "embassy-extras", | ||
| 23 | |||
| 24 | # Uncomment ONLY ONE of the groups below. | ||
| 25 | |||
| 26 | # nRF | ||
| 27 | #"embassy-nrf", | ||
| 28 | #"embassy-nrf-examples", | ||
| 29 | |||
| 30 | # stm32 | ||
| 31 | #"embassy-stm32", | ||
| 32 | #"embassy-stm32f4", | ||
| 33 | #"embassy-stm32l0", | ||
| 34 | #"embassy-stm32f4-examples", | ||
| 35 | |||
| 36 | # rp2040 | ||
| 37 | #"embassy-rp", | ||
| 38 | #"embassy-rp-examples", | ||
| 39 | |||
| 40 | # std | ||
| 41 | #"embassy-std", | ||
| 42 | #"embassy-std-examples", | ||
| 43 | ] | ||
| 44 | |||
| 45 | [profile.dev] | ||
| 46 | codegen-units = 1 | ||
| 47 | debug = 2 | ||
| 48 | debug-assertions = true | ||
| 49 | incremental = false | ||
| 50 | opt-level = 3 | ||
| 51 | overflow-checks = true | ||
| 52 | |||
| 53 | [profile.release] | ||
| 54 | codegen-units = 1 | ||
| 55 | debug = 2 | ||
| 56 | debug-assertions = false | ||
| 57 | incremental = false | ||
| 58 | lto = "fat" | ||
| 59 | opt-level = 's' | ||
| 60 | overflow-checks = false | ||
| 61 | |||
| 62 | # do not optimize proc-macro crates = faster builds from scratch | ||
| 63 | [profile.dev.build-override] | ||
| 64 | codegen-units = 8 | ||
| 65 | debug = false | ||
| 66 | debug-assertions = false | ||
| 67 | opt-level = 0 | ||
| 68 | overflow-checks = false | ||
| 69 | |||
| 70 | [profile.release.build-override] | ||
| 71 | codegen-units = 8 | ||
| 72 | debug = false | ||
| 73 | debug-assertions = false | ||
| 74 | opt-level = 0 | ||
| 75 | overflow-checks = false | ||
diff --git a/Cargo.toml b/Cargo.toml deleted file mode 100644 index bc3fcdd37..000000000 --- a/Cargo.toml +++ /dev/null | |||
| @@ -1,58 +0,0 @@ | |||
| 1 | |||
| 2 | [workspace] | ||
| 3 | members = [ | ||
| 4 | "embassy", | ||
| 5 | "embassy-traits", | ||
| 6 | "embassy-nrf", | ||
| 7 | "embassy-stm32", | ||
| 8 | "embassy-stm32f4", | ||
| 9 | "embassy-stm32l0", | ||
| 10 | "embassy-nrf-examples", | ||
| 11 | "embassy-stm32f4-examples", | ||
| 12 | "embassy-macros", | ||
| 13 | "embassy-extras", | ||
| 14 | ] | ||
| 15 | |||
| 16 | # embassy-std enables std-only features. Since Cargo resolves all features | ||
| 17 | # for all crates in the workspace together, including it would result in | ||
| 18 | # incompatible features enabled in embassy. | ||
| 19 | exclude = [ | ||
| 20 | "embassy-std", | ||
| 21 | "embassy-std-examples", | ||
| 22 | "embassy-rp", | ||
| 23 | "embassy-rp-examples", | ||
| 24 | ] | ||
| 25 | |||
| 26 | [profile.dev] | ||
| 27 | codegen-units = 1 | ||
| 28 | debug = 2 | ||
| 29 | debug-assertions = true | ||
| 30 | incremental = false | ||
| 31 | opt-level = 3 | ||
| 32 | overflow-checks = true | ||
| 33 | |||
| 34 | [profile.release] | ||
| 35 | codegen-units = 1 | ||
| 36 | debug = 2 | ||
| 37 | debug-assertions = false | ||
| 38 | incremental = false | ||
| 39 | lto = "fat" | ||
| 40 | opt-level = 's' | ||
| 41 | overflow-checks = false | ||
| 42 | |||
| 43 | # do not optimize proc-macro crates = faster builds from scratch | ||
| 44 | [profile.dev.build-override] | ||
| 45 | codegen-units = 8 | ||
| 46 | debug = false | ||
| 47 | debug-assertions = false | ||
| 48 | opt-level = 0 | ||
| 49 | overflow-checks = false | ||
| 50 | |||
| 51 | [profile.release.build-override] | ||
| 52 | codegen-units = 8 | ||
| 53 | debug = false | ||
| 54 | debug-assertions = false | ||
| 55 | opt-level = 0 | ||
| 56 | overflow-checks = false | ||
| 57 | |||
| 58 | [patch.crates-io] | ||
