serialport-rs is a general-purpose cross-platform serial port library for Rust. It provides a simple blocking I/O interface to low-level serial ports on POSIX and Windows systems. It reuses code from the https://github.com/dcuddeback/serial-rs[serial-rs] library and aims to provide a very similar interface to that of the https://doc.qt.io/qt-5/qserialport.html[QSerialPort] library.
== Feature Overview
The library has been organized such that there is a high-level
SerialPort trait that provides
a cross-platform API for accessing serial ports. This is the preferred method of interacting
with ports and as such is part of the
list_port() functions in
the root provide cross-platform functionality.
For platform-specific functionaly, this crate is split into a
windows API with
COMPort structs (that both implement the
SerialPort trait). Using
open*() functions will return the platform-specific port object which
allows access to platform-specific functionality.
This library is effectively a fork of the https://github.com/dcuddeback/serial-rs[serial-rs] library and was created as that library was slow to include enumeration support. I had also previously used the QSerialPort library and preferred that API to the one provided by serial-rs.
Rust versions 1.13 and higher are supported.
== Platform Support
Operating system support is as follows:
- Linux, i686 & x86_64
- Windows 7+, i686 & x86_64
- Mac OS X
Tier 1 supports means this library is build and run tested and is regularly used so this should be pretty bug-free. Tier 2 means it's only build and run tested, but no developer uses this as their primary development environment. Tier 3 means that the code is there to support that platform, but there's no build or run testing and no developer has this as their primary development environment.
Licensed under the https://opensource.org/licenses/LGPL-3.0[GNU Lesser Public License, version 3.0 or newer (LGPLv3+)].
Please open an issue and merge request on Gitlab to contibute. Code contributions will submitted for including in the work by you, as defined in the LGPLv3 license or newer, shall be licensed as the above, without any additional terms or conditions.
Special thanks to dcuddeback, willem66745, and apoloval who wrote the original serial-rs library which this library heavily borrows from. As that library licensed as MIT, the portions of this library that were copied from that one are licensed as MIT. All other code is licensed as LGPL version 3.0 or any later version. Therefore the license for this library as a whole is LGPLv3+.