summaryrefslogtreecommitdiff
path: root/Cargo.example.toml
blob: 0e9d1e32d3649492ca49d7f5a871b3ffe40e878e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# This file is a template for a Cargo workspace for developer convenience.
#
# Since Cargo resolves all features for all crates in the workspace together, 
# it is not possible to have a workspace with all the crates together, since they
# enable incompatible features. For example, nrf crates enable embassy-macros/nrf
# and stm32 crates enable embassy-macros/stm32. embassy-macros doesn't support having
# both of these features on at the same time, because it makes no sense.
#
# Instead, we provide this template so you can enable only the crates you're going to
# work on. This makes eg rust-analyzer check-on-save and autocomplete work, but only 
# in these crates, without any feature conflict.
#
# Copy this file to `Cargo.toml` and uncomment one group of crates below.
#
# `/Cargo.toml` is already in .gitignore, so you don't commit it accidentally.

[workspace]
resolver = "2"

members = [
    "embassy",
    "embassy-traits",
    "embassy-macros",
    "embassy-hal-common",
    "embassy-net",

    # Uncomment ONLY ONE of the groups below.

    # nRF
    #"embassy-nrf",
    #"examples/nrf",

    # stm32
    #"embassy-stm32",
    #"stm32-metapac",
    # uncomment ONLY ONE example crate.
    #"examples/stm32f4",
    #"examples/stm32h7",
    #"examples/stm32l0",
    #"examples/stm32l4",
    #"examples/stm32wb55",

    # rp2040
    #"embassy-rp",
    #"examples/rp",

    # std
    #"examples/std",
]

exclude = [
    # This is only built as a build-dependency, for the host. It shouldn't
    # get built for the target.
    "stm32-metapac-gen"
]

[profile.dev]
codegen-units = 1
debug = 2
debug-assertions = true
incremental = false
opt-level = 3
overflow-checks = true

[profile.release]
codegen-units = 1
debug = 2
debug-assertions = false
incremental = false
lto = "fat"
opt-level = 's'
overflow-checks = false

# do not optimize proc-macro crates = faster builds from scratch
[profile.dev.build-override]
codegen-units = 8
debug = false
debug-assertions = false
opt-level = 0
overflow-checks = false

[profile.release.build-override]
codegen-units = 8
debug = false
debug-assertions = false
opt-level = 0
overflow-checks = false