Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

-

## [0.4.0] - 2026-06-21

### Changed

- Remove the implementations of `strchr`, `strlen`, `strcspn` and `strspn` by default and add the `tinyrlibc` feature to pull them in from `tinyrlibc`.
When updating from an earlier version, enable the `tinyrlibc` feature.

## [0.3.2] - 2026-02-25

### Added
Expand Down
9 changes: 8 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
[package]
name = "littlefs2-sys"
description = "Low-level bindings to littlefs"
version = "0.3.2"
version = "0.4.0"
authors = ["Nicolas Stalder <n@stalder.io>", "The Trussed Developers"]
edition = "2018"
license = "BSD-3-Clause"
readme = "README.md"
categories = ["embedded", "filesystem", "no-std"]
repository = "https://github.com/nickray/littlefs2-sys"

[dependencies]
tinyrlibc = { version = "0.5", default-features = false, features = ["strchr", "strlen", "strcspn", "strspn"], optional = true }

[build-dependencies]
bindgen = { version = "0.70.1", default-features = false , features = ["runtime"] }
cc = "1"
Expand All @@ -20,6 +23,10 @@ malloc = []
software-intrinsics = []
multiversion = []

# littlefs2-sys requires implementations of the strchr, strlen, strcspn and strspn functions. If
# these are not provided by a different source, enable this feature to pull them in from tinyrlibc.
tinyrlibc = ["dep:tinyrlibc"]

# unstable features -- enabling one of the following features may break semantic versioning guarantees

# use a patched version of littlefs: https://github.com/trussed-dev/littlefs/releases/tag/v2.9-trussed.1
Expand Down
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ Upstream release: [v2.9.3][upstream-release]

#### License

<sup>littlefs is licensed under [BSD-3-Clause][bsd-3-clause], as are these bindings.</sup>
<br>
<sub>The file `string.c` is licensed under GPL-2.0.<br>
Permissively licensed replacement implementation welcome!</sub>
littlefs is licensed under [BSD-3-Clause][bsd-3-clause], as are these bindings.

[bsd-3-clause]: https://github.com/ARMmbed/littlefs/blob/master/LICENSE.md
3 changes: 1 addition & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
.include(&out_path)
.include(littlefs_path)
.file(format!("{littlefs_path}/lfs.c"))
.file(format!("{littlefs_path}/lfs_util.c"))
.file("string.c");
.file(format!("{littlefs_path}/lfs_util.c"));

#[cfg(feature = "software-intrinsics")]
let builder = builder.flag("-DLFS_NO_INTRINSICS");
Expand Down
4 changes: 4 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,8 @@
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]

// We need this extern crate statement to indicate that we want to link against tinyrlibc.
#[cfg(feature = "tinyrlibc")]
extern crate tinyrlibc;

include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
59 changes: 0 additions & 59 deletions string.c

This file was deleted.

Loading