add transport feature: meta-share transport-plugin contract, client, harness, focus replica, testkit

This commit is contained in:
Worph
2026-10-03 15:43:55 +00:00
parent 1c9d415a1e
commit cd426de1e8
20 changed files with 4173 additions and 1 deletions
+17 -1
View File
@@ -1,6 +1,6 @@
[package]
name = "meta-feeder-sdk"
version = "1.3.0"
version = "1.4.0"
edition = "2021"
rust-version = "1.85"
license = "MIT"
@@ -31,6 +31,14 @@ publish = false
# and the libp2p wire. Keep heavy deps (librqbit, beetswap, cid, libp2p) OUT
# of here so feeders that don't need them don't pay for them.
[features]
# The meta-share transport-plugin contract (`src/transport/`): the hull's
# client, the plugins' axum harness, the focus replica, shared error/range
# types. Off by default so feeders build exactly what they always did.
transport = ["dep:cid", "dep:libc", "dep:tokio-util"]
# Conformance checks any transport implementation must pass.
testkit = ["transport"]
[dependencies]
# Async runtime + HTTP server (the serve_feeders harness)
tokio = { version = "1.40", features = ["full"] }
@@ -58,6 +66,14 @@ regex = "1"
# cache.rs. Pure-Rust single-process embedded store.
redb = "2"
# CID parsing for the transport contract only (`transport::cid`). Optional so
# feeders don't pull it.
cid = { version = "0.11", optional = true }
# statvfs(2) for `transport::fsutil::available_bytes`.
libc = { version = "0.2", optional = true }
# `ReaderStream` for `transport::file`.
tokio-util = { version = "0.7", features = ["io"], optional = true }
[dev-dependencies]
tempfile = "3"
tokio = { version = "1.40", features = ["full", "test-util"] }