Commit Graph
12 Commits
Author SHA1 Message Date
Sosthène Guédon a20abaf627 Fix clippy warnings 2024-12-10 10:48:49 +01:00
Robin Krahl 0d753af154 Release littlefs2-core v0.1.0 2024-10-17 10:58:24 +02:00
Robin Krahl d86f5fa7ab core: Never inline Path to PathBuf conversion 2024-10-15 14:07:51 +02:00
Robin Krahl bea46411a1 core: Remove debug information from Error
If unwrap or expect is used on a Result<_, Error>, the Debug
implementation is not always optimized out.  This leads to a significant
increase of the binary size. As a short-term fix, this patch changes the
Debug implementation to always returns a static string.
2024-10-14 21:23:41 +02:00
Robin Krahl a1f8d9e87b core: Add support for heapless-bytes
Similar to the existing support for multiple heapless versions, this
patch also adds support for heapless-bytes 0.3 and 0.4.
2024-09-13 11:44:54 +02:00
Robin Krahl 932a40f2da core: Make heapless support optional and support multiple versions
The DynFile::read_to_end, DynFilesystem::read and
DynFilesystem::read_chunk methods use a heapless::Vec to store a
flexible amount of data.  This patch introduces a Vec trait that
abstracts over different versions of heapless so that we can optionally
support multiple heapless versions at the same time.

Fixes: https://github.com/trussed-dev/littlefs2/issues/77
2024-09-13 11:44:33 +02:00
Robin Krahl 69ff97406d Remove dir-entry-path feature
The dir-entry-path feature has been enabled by default and only adds a
very small overhead.  To decrease complexity, this patch removes the
feature and always enables the previously feature-gated code.

Fixes: https://github.com/trussed-dev/littlefs2/issues/76
2024-09-13 11:04:11 +02:00
Robin Krahl e21c691032 Refactor attributes API
This patch refactory the API to read and write attributes so that the
buffer is always provided by the caller.  This means that the caller is
not required to always use a 1 kB buffer even if the attribute length is
much smaller.

Fixes: https://github.com/trussed-dev/littlefs2/issues/75
2024-08-16 12:01:03 +02:00
Robin Krahl 85ac8165d0 core: Use c_int where applicable
This patch applies those changes from
https://github.com/trussed-dev/littlefs2/pull/69 that affect the core
crate.
2024-08-15 08:47:07 +02:00
Robin Krahl 95fd60a59c core: Move size constants into associated constants
To reduce the number of global items and for consistency with constants
like u8::MAX, this patch replaces the size constants ATTRBYTES_MAX,
PATH_MAX and PATH_MAX_PLUS_ONE with associated constants
Attribute::MAX_SIZE, PathBuf::MAX_SIZE and PathBuf::MAX_SIZE_PLUS_ONE.
2024-08-12 08:30:28 +02:00
Robin Krahl ce4809097a core: Remove generic-array dependency
By refactoring the Attribute struct using const generics, we can get rid
of the (public) generic-array dependency.
2024-08-12 08:30:28 +02:00
Robin Krahl 7356da54d1 Introduce littlefs2-core crate
To make it easier to maintain applications using littlefs2, this patch
introduces a littlefs2-core crate with the basic types and traits used
by littlefs2, but without a specific implementation.

Fixes: https://github.com/trussed-dev/littlefs2/issues/55
2024-08-12 08:30:25 +02:00