Sosthène Guédon
15816dfb51
Make allocation !Unpin
2025-06-19 16:30:02 +02:00
Sosthène Guédon
a913f1b902
Make read_dir api safe
2025-06-19 15:58:08 +02:00
Sosthène Guédon
5c1e43fb6e
Make use of Pin to make the main API safe
2025-06-19 15:56:03 +02:00
Sosthène Guédon
d5317124f8
Make Filesystem Send
...
`Filesystem` is still `!Sync`, so this allows putting the filesystem behind a `Mutex`
and sharing it across threads but still prevents concurrent operations from multiple threads.
See https://github.com/trussed-dev/littlefs2/issues/108#issuecomment-2975793283
2025-06-19 10:12:45 +02:00
Sosthène Guédon
95d53c8f80
Remove the use of RefCell in File
...
The previous `RefCell` was only dealing with a pointer and the data was always
held by the lfs side so the checking from the refcell was useless anyways
This also contains a breaking change because the `unsafe` `open` function
did not take the correct lifetime.
It think it's an acceptable breaking change because the previous behaviour was buggy
and any code that depends on it likely has a use after free.
2025-06-19 10:12:10 +02:00
Sosthène Guédon
d0ebffac28
Allow showing hex content of littlefs files
2025-06-18 15:26:17 +02:00
Sosthène Guédon
4f055aab12
Make list accept dynamic Filesystem parameters without recompilation
2025-06-18 15:26:17 +02:00
Sosthène Guédon
7e94b3d8b0
Remove need for generic array and typenum constants
...
This will also allow for more flexible `Storage` implementations
that use `Vec<u8>` as a cache buffer and are not fixed to a single block size
2025-06-18 15:26:01 +02:00
Sosthène Guédon and sosthene-nitrokey
b3a7371d84
Add tests that files can still be read after and before shrinknig
v0.6.1-nitrokey.1
2025-05-14 10:16:21 +02:00
Sosthène Guédon and sosthene-nitrokey
5ab86b5c7a
Add tests
2025-05-14 10:16:21 +02:00
Sosthène Guédon and sosthene-nitrokey
aeae7a0a54
Use tagged commit
2025-05-14 10:16:21 +02:00
Sosthène Guédon and sosthene-nitrokey
b25c9262b6
Update littlefs2-sys to use trussed version of littlefs
2025-05-14 10:16:21 +02:00
Sosthène Guédon and sosthene-nitrokey
9eaca6732b
Fix avr compilation
2025-05-14 10:16:21 +02:00
Sosthène Guédon and sosthene-nitrokey
4c320aea25
mount_or_else: ensure that allocation has not been overwritten in the else clause
2025-05-14 10:16:21 +02:00
Sosthène Guédon and sosthene-nitrokey
6653300ce3
core: add debug-error feature to have a proper debug implementation of errors
2025-05-14 10:16:21 +02:00
Sosthène Guédon and sosthene-nitrokey
4f86dc4f8f
mount_or_else: give access to allocation in callback
2025-05-14 10:16:21 +02:00
Sosthène Guédon and sosthene-nitrokey
a37ba04ce8
fixup! Add support for littlefs opening flags
2025-05-14 10:16:21 +02:00
Sosthène Guédon and sosthene-nitrokey
f0cac435dd
Fix clippy warnings
2025-05-14 10:16:21 +02:00
Sosthène Guédon and sosthene-nitrokey
3b3f5ac9bc
Fix avr CI
2025-05-14 10:16:21 +02:00
Sosthène Guédon and sosthene-nitrokey
214131dcee
Add support for shrinking/growing filesystems
2025-05-14 10:16:21 +02:00
Sosthène Guédon and sosthene-nitrokey
e09f0a44dc
Add support for littlefs opening flags
2025-05-14 10:16:21 +02:00
Sosthène Guédon
5bb11851a3
core: Make io::Result alias accept generic error type
2025-03-11 11:51:15 +01:00
Sosthène Guédon and sosthene-nitrokey
8ed1c5cf50
Fix list panic when last block of the filesystem is used
2025-03-07 17:01:15 +01:00
Robin Krahl
53bbcd4f7b
Release v0.6.1
0.6.1
2025-03-04 20:21:53 +01:00
Robin Krahl
9680d4f583
Add DynStorageAlloc using FnOnce
...
Our DynStorage trait uses a &mut dyn FnMut as a callback for
implementing mount_and_then (instead of a FnOnce like Filesystem). This
is because there is no no-std way to pass a FnOnce in an dyn compatible
trait method.
If alloc is available, this limitation can be avoided by using a
Box<dyn FnOnce>. This patch adds an alloc feature to the crate and a
DynStorageAlloc trait behind that feature that provides mount_and_then
functions using a boxed FnOnce instead of a reference to an FnMut.
2025-03-04 20:21:53 +01:00