Skip to content

Let back-ends depend on an SPI#562

Merged
hannesdejager merged 1 commit intomasterfrom
spi
Feb 13, 2026
Merged

Let back-ends depend on an SPI#562
hannesdejager merged 1 commit intomasterfrom
spi

Conversation

@hannesdejager
Copy link
Collaborator

@hannesdejager hannesdejager commented Feb 12, 2026

This split moves the backend-facing API surface into a dedicated crate such that unftp-sbe-* and unftp-auth-* back-ends/plugins/extentions only depend on this new crate called unftp-core.

The name reflects its role as the common dependency and contract for libunftp and all backend implementations, while avoiding lib* or Java-ish SPI-style naming that is uncommon in the Rust ecosystem. This keeps the public surface clear, idiomatic, and consistent with existing unftp-* crates.

Why this change:

  • Backends shouldn’t force libunftp feature flags or crypto provider choices which was becoming awkward.
  • A stable interface crate lets backends evolve independently of server internals i.e. back-ends don't need to go to a new version if some server implementation bug was fixed.
  • Smaller dependency graphs for backends reduce compile times and rebuild scope

What I did:

  • Introduced the unftp-core crate with auth/storage traits, errors, and helper types
  • Switched auth and storage backends to depend on unftp-core
  • Updated examples and docs to use ServerBuilder instead of ServerExt - ServerExt unfortunately had to go cause it caused a dependency for back-ends on libunftp again.

@hannesdejager hannesdejager force-pushed the spi branch 5 times, most recently from a1db526 to 16194d3 Compare February 12, 2026 23:10
@hannesdejager hannesdejager force-pushed the spi branch 2 times, most recently from 069a9df to e960f75 Compare February 13, 2026 21:19
This split moves the backend-facing API surface into a dedicated crate such that
unftp-sbe-* and unftp-auth-* back-ends/plugins/extentions only depend on
this new crate called `unftp-core`.

The name reflects its role as the common dependency and contract for libunftp and
all backend implementations, while avoiding lib* or Java-ish SPI-style naming that
is uncommon in the Rust ecosystem. This keeps the public surface clear, idiomatic,
and consistent with existing unftp-* crates.

Why this change:

- Backends shouldn’t force libunftp feature flags or crypto provider choices which
  was becoming awkward.
- A stable interface crate lets backends evolve independently of server internals
  i.e. back-ends don't need to go to a new version if some server implementation
  bug was fixed.
- Smaller dependency graphs for backends reduce compile times and rebuild scope

What I did:

- Introduced the `unftp-core` crate with auth/storage traits, errors, and helper types
- Switched auth and storage backends to depend on `unftp-core`.
- Updated examples and docs to use `ServerBuilder` instead of `ServerExt` -
  `ServerExt` unfortunately had to go cause it caused a dependency for back-ends on
  libunftp again.
@hannesdejager hannesdejager merged commit 3ba7efd into master Feb 13, 2026
8 checks passed
@hannesdejager hannesdejager deleted the spi branch February 13, 2026 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants