1 unstable release

Uses old Rust 2015

0.4.0 Jul 2, 2017

#123 in #serial

Download history 43231/week @ 2025-09-20 45107/week @ 2025-09-27 44672/week @ 2025-10-04 54408/week @ 2025-10-11 74506/week @ 2025-10-18 71429/week @ 2025-10-25 71890/week @ 2025-11-01 62016/week @ 2025-11-08 62425/week @ 2025-11-15 66334/week @ 2025-11-22 73157/week @ 2025-11-29 177460/week @ 2025-12-06 161576/week @ 2025-12-13 83625/week @ 2025-12-20 90259/week @ 2025-12-27 169179/week @ 2026-01-03

541,630 downloads per month
Used in 3 crates

MIT license

63KB
985 lines

Unix Serial Ports

The serial-unix crate provides a serial port implementation for Unix operating systems.

Compatibility

The serial-unix crate is compatible with any Unix operating system that implements the termios API. The following platforms are confirmed to be compatible:

  • Linux (x86_64, armv6l)
  • OS X (x86_64)
  • FreeBSD (amd64)
  • OpenBSD (amd64)

Usage

In general, one shouldn't need to use the serial-unix library directly. The implementation provided by serial-unix is also exposed through a cross-platform API in the serial crate.

The serial port type defined in serial-unix works with any Unix TTY device. In addition to implementing the standard serial port traits, it also implements std::os::unix::io::AsRawFd, which can be used for integrating with other I/O libraries. See examples/poll.rs for an example of using AsRawFd for event-driven I/O.

License

Copyright © 2015 David Cuddeback

Distributed under the MIT License.

Dependencies

~135KB