134 Commits

Author SHA1 Message Date
Alex Martens
bee84f9e77 Merge branch 'main' into impl-alloc-interop 2025-04-06 17:34:50 -07:00
Alex Martens
f83c254cf1 Cargo.toml: add alloc to docs.rs build 2025-04-06 17:31:16 -07:00
Markus Reiter
0b1e1a50ba
Add bytes feature. 2025-04-06 21:42:37 +02:00
xgroleau🐢
1ea90099b8
Added support for Bytes 2025-04-06 21:31:06 +02:00
Markus Reiter
5785761b98
Make ufmt feature optional. 2025-04-06 19:30:40 +02:00
Lucas Bollen
b21563dfa7
Add the uDisplay trait for String incl test.
Did not add `uDisplay` for `Vec` because there is no trivial implementation.

# Conflicts:
#	Cargo.toml
#	src/ufmt.rs
2025-04-06 19:28:42 +02:00
Markus Reiter
6067119ed3
Rename defmt-1 feature to defmt. 2025-04-05 23:46:31 +02:00
Alex Martens
12086b194b defmt: 0.3 -> 1 2025-04-05 23:40:46 +02:00
Adam Wagenhäuser
e7a02ed780 Implement conversions between alloc and heapless vecs. 2025-03-21 18:20:49 +01:00
Markus Reiter
b26099a15c
Implement pool for any 32/64-bit architecture that supports the corresponding atomics. 2024-02-27 20:02:09 +01:00
Markus Reiter
7bb2f71b55
Use static_assertions instead of trybuild. 2024-02-19 10:43:20 +01:00
rmsyn
22745bef87
deps: make stable_deref_trait an optional dependency
Configures the `stable_deref_trait` to only be included for `arm_llsc`
and `target_arch = "x86"` platforms. This is because the dependency is
only used for the `pool` module, and the `pool` module is only used on
the above platforms.

Reduces the dependency graph for all other platforms.
2023-11-13 02:00:55 +00:00
Dario Nieuwenhuis
f66932381c Fix portable-atomic-x feature not enabling portable-atomic. 2023-11-07 20:10:43 +01:00
Alex Martens
4799f8ce10 docs: modernize intra doc links 2023-10-31 21:06:44 -07:00
Dario Nieuwenhuis
f58e509664 Simplify atomic availability detection.
- `cfg(target_has_atomic)` is stable now, use that.
- Hardcode in `build.rs` the list of targets with load/store but no CAS,
  since `cfg(target_has_atomic_load_store)` is not stable yet.
- Do not try to autodetect whether `portable-atomic` is needed or not,
  just let the user control it directly. If the user doesn't explicitly
  enable `portable-atomic` and native atomics are unavailable, the
  features requiring it will be missing.
2023-10-31 00:02:03 +01:00
Dario Nieuwenhuis
7e6bff31a7
Merge pull request #328 from Dirbaio/portable-atomic
Use `portable-atomic` instead of `atomic-polyfill`.
2023-10-30 21:17:47 +00:00
Alex Martens
35a20c0297 edition: 2018 -> 2021 2023-10-30 14:11:15 -07:00
Dario Nieuwenhuis
8f6dc813d6 Use portable-atomic instead of atomic-polyfill. 2023-10-30 22:00:34 +01:00
Alex Martens
ffc396cb79 ufmt: 0.1 -> 0.2 2023-10-21 08:57:28 +09:00
Dario Nieuwenhuis
b7a65ef3ae use more readable single-line syntax in Cargo.toml. 2023-10-21 00:27:12 +02:00
Dario Nieuwenhuis
24bfda59cb thread scopes are stable now. 2023-10-21 00:00:21 +02:00
Dario Nieuwenhuis
11929c5bcb Remove unused dependency spin. 2023-10-20 23:56:56 +02:00
Alex Martens
07a961182b Update repository URL 2023-10-20 23:43:03 +02:00
Flole998
02935035b1 Add polyfills for ESP32S2 2023-01-23 14:34:40 +00:00
Adam Mork
2726f63bdc
update spin dependency to newer version 2023-01-10 17:30:58 -08:00
Jorge Aparicio
fb3f34c04a revamp pool API 2022-10-18 11:43:50 +02:00
Jorge Aparicio
4cf4145b45 bump other atomic-polyfill versions 2022-09-23 16:40:52 +02:00
Robert Forsman
b0e4cb8af0 switch to a more recent atomic-polyfill that compiles for AVR 2022-09-23 16:28:32 +02:00
Jorge Aparicio
7432dd9069 bump crate version
to ensure we don't do another 0.7.x release by mistake
2022-08-12 15:57:44 +02:00
Jorge Aparicio
730ab75741 [breaking-change] use hash32 v0.3.0
this release of `hash32` has the advantage that 32-bit hashers can be used to hash types that
implement the `core:#️⃣:Hash` trait removing the need for the `hash32::Hash` implementations in
this crate and the uses of the `#[derive(Hash32)]` macro (which did not support enums) in dependent
crates

with this change the following code works
``` rust
// NOTE no derive(Hash32)
struct Int(i32);

let mut x = FnvIndexSet::<_, 4>::default();
let _ = x.insert(Int(0));
```

this change is technically a breaking change because the following code is no longer accepted

``` rust
// assume this type comes from a dependency
// NOTE no derive(Hash)
struct Int(i32);

let mut x = FnvIndexSet::<_, 4>::default();
let _ = x.insert(Int(0)); // error: does not implement Hash
```
2022-08-12 15:57:01 +02:00
Jorge Aparicio
8a98b2650d v0.7.16 2022-08-09 15:47:24 +02:00
Jorge Aparicio
610bf51238 v0.7.15 2022-07-05 12:19:33 +02:00
Jorge Aparicio
309f150ca0 v0.6.14 2022-06-15 15:11:11 +02:00
Robert Forsman
c8e6dcc3da act on japaric's requests using techniques from Rahix to more generically support AVR 2022-06-14 13:47:05 -04:00
Robert Forsman
3b9b9f7548 Merge remote-tracking branch 'upstream/master' 2022-05-28 18:38:23 -04:00
Jorge Aparicio
39273893de v0.7.13 2022-05-16 12:14:22 +02:00
Jorge Aparicio
4431ae1e25 v0.7.12 2022-05-12 15:27:32 +02:00
Jorge Aparicio
a94c1d0f59 riscv32imc needs the same treatment 2022-05-12 15:02:58 +02:00
Jorge Aparicio
5d9e4b6268 unconditionally depend on atomic-polyfill for riscv32i target 2022-05-12 14:35:37 +02:00
Jorge Aparicio
0cb35c7170 v0.7.11 2022-05-09 15:25:16 +02:00
Jorge Aparicio
3d3277f6d3 only build tests that require thread::scope on nightly 2022-04-29 15:21:58 +02:00
Jorge Aparicio
477c53b25d use std:🧵:scope instead of scoped_threadpool
as it's easier to deal with TSAN false positives in the former API

as surfaced in PR 280 the current supression rules don't handle newer versions of the
scoped_threadpool crate

trying to update the supression rules related to scoped_threadpool in PR #282 revealed that the
supression rules are masking (hiding) real data races:
https://github.com/japaric/heapless/pull/282#issuecomment-1113173358

std:🧵:scope requires less supression rules and does not mask real data races -- for instance,
the data race in the linked issue comment is not masked when using std:🧵:scope

tradeoffs:
- pro: one less dev dependency
- pro: supressions file is simpler
- cons: std:🧵:scope is only available on recent nightlies
2022-04-29 15:20:55 +02:00
Robert Forsman
ff4cdab2ab release 0.1.8 of atomic-polyfill now supports AVR 2022-04-12 16:27:28 -04:00
Robert Forsman
cde5da25e4 rely on packages that use us to patch crates.io for AVR 2022-04-12 14:34:05 -04:00
Robert Forsman
75f330caa2 add support for the Arduino Mega 2560 board 2022-03-29 17:20:45 -04:00
Robert Forsman
d890acbef2 first draft at support for AVR/Arduino 2022-03-22 17:27:45 -04:00
Emil Fresk
98b7dd41f8 Release 0.7.10 2022-01-21 12:03:14 +01:00
Tyler Holmes
5cf74504da
Merge branch 'master' into allow-non-x86-hosts 2022-01-20 09:59:22 -08:00
Tyler Holmes
58e020a287 have docs.rs document the optional features 2022-01-17 11:31:40 -08:00
Tyler Holmes
63c0370d69 add riscv cas atomic support and cleanup the #cfg's for it 2022-01-17 11:31:40 -08:00