modem-transfer
modem-transfer is Navop's built-in ZMODEM protocol engine. The caller owns all
I/O and drives the protocol state machine. The Rust library target remains named
zmodem2 so the existing terminal integration API does not need a broad rename.
This crate is fully no_std compatible and heapless.
Provenance
This crate is derived from zmodem2 0.7.2 by Jarkko Sakkinen, which is based on
prior work by Aleksei Arbuzov in the
zmodem crate.
Upstream: https://codeberg.org/jarkko/zmodem2
The upstream and retained source are licensed under MIT OR Apache-2.0. See
LICENSE-MIT and LICENSE-APACHE.
Navop maintains interoperability fixes including negotiated ESCCTL escaping, ZFILE retry behavior, and stock lrzsz integration coverage.
OxideTerm was consulted only as a high-level architectural reference for keeping
the protocol engine in a first-party workspace crate and separating it from the
terminal UI, transport, and filesystem. No OxideTerm source code was copied or
adapted. The protocol implementation in this crate remains Navop's maintained
zmodem2-derived engine described above.
Usage
Create a Sender or Receiver, then loop on poll() and act on the returned
Action:
Action::WriteWire(bytes)— write the bytes to the transport, then callwire_written(n)with the number of bytes accepted.Action::ReadFile { offset, max_len }(sender) — read the requested file bytes and provide them withsubmit_file(data).Action::WriteFile(bytes)(receiver) — persist the bytes, then callfile_written(n).Action::Event(event)— handle a protocolEvent(file/session lifecycle).Action::Idle— feed incoming transport bytes withsubmit_wire(bytes), or calltimeout()if none arrive.
The sender offers files with start_file(FileInfo) and ends the session with
finish(). Either side can abort().