9 releases

Uses new Rust 2024

new 0.0.2-rc.1 Apr 18, 2026
0.0.1 Mar 28, 2026
0.0.1-rc.2 Feb 26, 2026

#8 in #gadget

Download history 235/week @ 2026-02-26 102/week @ 2026-03-05 55/week @ 2026-03-19 61/week @ 2026-03-26 2/week @ 2026-04-02 22/week @ 2026-04-09

140 downloads per month
Used in 2 crates (via smoo-gadget-app)

GPL-3.0-only

165KB
4.5K SLoC

smoo-gadget-core

Much of the "guts" of smoo's gadget daemon live here:

  • IoPump owns and drives the protocol interactions on the (USB) wire.
  • ExportController runs a reconciler that drives configured exports (from the host) into corresponding online ublk targets.
  • LinkController is also a kinda-reconciler that handles the USB link (or the host side driving it) going away and/or coming online, and ensures in-flight I/O is parked and replayed (no timeouts).
  • StateStore handles (un)marshaling the runtime state we need to survive across daemon restarts/crashes.

Currently, we assume that we're dispatching i/o requests from ublk to USB via FunctionFS. In the future, if we were to support other platforms/targets, we'd try to tease the ublk / FFS parts into separate crates. That's very much out of scope for now, though.

The bits that drive the actual ublk (ctrl + i/o queues) rings live in smoo-gadget-ublk.

Dependencies

~16–27MB
~454K SLoC