Improving Ergonomics and Safety of serialport-rs
The recent release of serialport 4.9.0 has provided an opportunity to thoughtfully plan the next major release, catching up on features that have been postponed for years which includes trait-object architecture, internal panics that manifest unexpectedly and an outdated MSRV 1.59(which was being leveled up to 1.75 recently) causing actual dependency resolution problems. This project lays the foundation for the next big release. I will start with a downstream usage audit of public dependents to guarantee that the refactoring decisions have minimal migration difficulties. This will be followed by the implementation of struct unification where backends using Box<dyn SerialPort> will be replaced with concrete structs while maintaining compile time compatibility for typical usage scenarios. Capabilities such as exclusive locking and RS485 settings will be provided using extension traits for platform specific operations. Panicking conversions such as FromRawFd will be replaced with fallible TryFrom variants. The MSRV will be bumped along with CI extension of cargo-minimal-versions.
Project details
Technologies
Not listed in the archive