Commit 7a3ddfb
authored
core: add
## Motivation
I want to use `bevy_reflect` on `no_std` devices. This platform has alloc,
but not atomics, so `alloc::sync` is missing. `bevy_relflect` has a hard
depency on `tracing`, and I'd like to use tracing on this platform also.
Want to use tracing-core on `no_std` devices like rp2040
without hardware atomics
## Solution
- Added `portable-atomic-util` as an optional dependency
gated behind a new feature, `portable-atomic` to
`tracing-core`
- When `portable-atomic` is enabled, switched uses of
`Arc` and `Weak` away from `alloc::sync` to
`portable_atomic_util`.
- Added workaround for a lack of support for
[unsized coercion](rust-lang/rust#18598)
in custom types. I've included a comment linking to this issue
explaining the missing functionality.
Fixes #3173portable-atomic support (#3199)1 parent d6505ca commit 7a3ddfb
3 files changed
+29
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
39 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
7 | 13 | | |
8 | 14 | | |
9 | 15 | | |
| |||
772 | 778 | | |
773 | 779 | | |
774 | 780 | | |
775 | | - | |
| 781 | + | |
776 | 782 | | |
777 | 783 | | |
778 | 784 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
158 | 161 | | |
159 | 162 | | |
160 | 163 | | |
| |||
539 | 542 | | |
540 | 543 | | |
541 | 544 | | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
542 | 558 | | |
543 | | - | |
| 559 | + | |
544 | 560 | | |
545 | 561 | | |
546 | 562 | | |
| |||
0 commit comments