#serial #no-std

no-std xmodem

An implementation of the XMODEM file-transfer protocol

5 releases

Uses new Rust 2024

0.4.0 Jul 31, 2025
0.1.3 Jan 14, 2016
0.1.2 Jan 11, 2016
0.1.1 Jan 11, 2016
0.1.0 Jan 11, 2016

#18 in #serial

Download history 20/week @ 2025-07-09 21/week @ 2025-07-16 30/week @ 2025-07-23 142/week @ 2025-07-30 43/week @ 2025-08-06 23/week @ 2025-08-13 35/week @ 2025-08-20 17/week @ 2025-08-27 48/week @ 2025-09-03 35/week @ 2025-09-10 37/week @ 2025-09-17 44/week @ 2025-09-24 37/week @ 2025-10-01 7/week @ 2025-10-08 10/week @ 2025-10-15 7/week @ 2025-10-22

70 downloads per month

MIT license

20KB
415 lines

XMODEM.rs

The XMODEM protocol in Rust

This is derived from https://github.com/awelkie/xmodem.rs. It has been modified primarily to support no_std use and for use with the 2018 edition. All four permutations of standard 128-byte and 1024-byte block sizes, classic and CRC16 variants are supported for send and receive. YMODEM and ZMODEM are not implemented. In addition, the send and recv methods return the number of bytes of data sent or received.

For a no_std build, it is necessary to request the core feature in addition to --no-default-features or default-features = false on account of cargo#1839. Additionally, your compiler must be known to core_io. Changes are welcome to allow the use of alternate crates providing Read and Write traits with the same signatures as those in std::io; unfortunately this does not include (most of?) the Embedded HAL crates, which provide slightly different signatures.

Testing

The tests require the binaries found in the lrzsz package. There are no tests for the no_std build.

Dependencies

~125KB