Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,23 +67,23 @@ jobs:
disable_extra_builds: true
disable_tests: true
target: aarch64-apple-darwin
toolchain: "1.59.0"
toolchain: "1.71.0"

msrv-arm-linux-androideabi:
uses: ./.github/workflows/build.yaml
with:
disable_extra_builds: true
disable_tests: true
target: arm-linux-androideabi
toolchain: "1.59.0"
toolchain: "1.71.0"

msrv-x86_64-unknown-freebsd:
uses: ./.github/workflows/build.yaml
with:
disable_extra_builds: true
disable_tests: true
target: x86_64-unknown-freebsd
toolchain: "1.59.0"
toolchain: "1.71.0"

msrv-x86_64-unknown-linux-gnu:
uses: ./.github/workflows/build.yaml
Expand All @@ -92,7 +92,7 @@ jobs:
disable_tests: true
extra_packages: libudev-dev
target: x86_64-unknown-linux-gnu
toolchain: "1.59.0"
toolchain: "1.71.0"

msrv-x86_64-unknown-linux-musl:
uses: ./.github/workflows/build.yaml
Expand All @@ -101,7 +101,7 @@ jobs:
disable_tests: true
extra_packages: gcc-aarch64-linux-gnu
target: aarch64-unknown-linux-musl
toolchain: "1.59.0"
toolchain: "1.71.0"

msrv-x86_64-pc-windows-msvc:
uses: ./.github/workflows/build.yaml
Expand All @@ -110,15 +110,15 @@ jobs:
disable_tests: true
runs_on: windows-2025
target: x86_64-pc-windows-msvc
toolchain: "1.59.0"
toolchain: "1.71.0"

msrv-x86_64-unknown-netbsd:
uses: ./.github/workflows/build.yaml
with:
disable_extra_builds: true
disable_tests: true
target: x86_64-unknown-netbsd
toolchain: "1.59.0"
toolchain: "1.71.0"

# --------------------------------------------------------------------------
# Semantic Versioning
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ project adheres to [Semantic Versioning](https://semver.org/).
* Output USB VID and PID in hexadecimal digits in `UsbPortInfo`'s `Debug`
representation.
[#290](https://github.com/serialport/serialport-rs/pull/290)
* Migrated away from unmaintainted dependency `mach2`.
* Migrated from `io-kit-sys` to `objc2-io-kit`.
* Migrated from `core-foundation` to `objc2-core-foundation`.

### Fixed
### Removed
Expand Down
24 changes: 17 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = [
"Jesse Braham <[email protected]>",
]
edition = "2021"
rust-version = "1.59.0"
rust-version = "1.71.0"
description = "A cross-platform low-level serial port library."
documentation = "https://docs.rs/serialport"
repository = "https://github.com/serialport/serialport-rs"
Expand All @@ -22,12 +22,22 @@ nix = { version = "0.26", default-features = false, features = ["fs", "ioctl", "
libudev = { version = "0.3.0", optional = true }
unescaper = "0.1.3"

[target.'cfg(any(target_os = "ios", target_os = "macos"))'.dependencies]
# TODO: Remove pinning this dependency when we are bumping our MSRV.
core-foundation = "=0.10.0"
core-foundation-sys = "0.8.4"
io-kit-sys = "0.4.0"
mach2 = "0.4.1"
[target.'cfg(target_vendor = "apple")'.dependencies]
objc2-io-kit = { version = "0.3.2", default-features = false, features = [
"std",
"libc",
"usb",
"serial",
"IOUSBLib",
"IOUSBHostFamilyDefinitions",
] }
objc2-core-foundation = { version = "0.3.2", default-features = false, features = [
"std",
"CFBase",
"CFDictionary",
"CFNumber",
"CFString",
] }

[target."cfg(windows)".dependencies.windows-sys]
version = "0.52.0"
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[![crates.io version badge](https://img.shields.io/crates/v/serialport.svg)](https://crates.io/crates/serialport)
[![Documentation](https://docs.rs/serialport/badge.svg)](https://docs.rs/serialport)
[![GitHub workflow status](https://img.shields.io/github/actions/workflow/status/serialport/serialport-rs/ci.yaml?branch=main&logo=github)](https://github.com/serialport/serialport-rs/actions)
[![Minimum Stable Rust Version](https://img.shields.io/badge/Rust-1.59.0-blue?logo=rust)](https://blog.rust-lang.org/2022/02/24/Rust-1.59.0.html)
[![Minimum Stable Rust Version](https://img.shields.io/badge/Rust-1.71.0-blue?logo=rust)](https://blog.rust-lang.org/2023/07/13/Rust-1.71.0/)

# Introduction

Expand Down Expand Up @@ -116,7 +116,7 @@ can help debug software or hardware errors.

# Dependencies

Rust versions 1.59.0 and higher are supported by the library itself. There are
Rust versions 1.71.0 and higher are supported by the library itself. There are
examples requiring newer versions of Rust.

For GNU/Linux `pkg-config` headers are required:
Expand Down Expand Up @@ -152,7 +152,7 @@ demand.
- `i686-unknown-linux-musl`
- `x86_64-unknown-linux-gnu`
- `x86_64-unknown-linux-musl`
- macOS/iOS
- macOS/iOS/tvOS/watchOS/visionOS
- `aarch64-apple-darwin`
- `aarch64-apple-ios`
- `x86_64-apple-darwin`
Expand Down
4 changes: 2 additions & 2 deletions doc/platforms.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ The BSDs basically **only** have the Termios2 API, but they call it Termios. It

* https://man.openbsd.org/tty.4

## macOS and iOS
## Darwin

While macOS and iOS have the heritage of a BSD, their support is slightly different. In theory, they support arbitrary baud rates in their Termios API much like the BSDs, but in practice this doesn't work with many hardware devices, as it's dependent on driver support. Instead, Apple added the `IOSSIOSPEED` ioctl in Mac OS X 10.4, which can set the baud rate to an arbitrary value. As the oldest macOS version supported by Rust is 10.7, it's available on all Mac platforms.
While macOS, iOS, and similar Apple platforms have the heritage of a BSD, their support is slightly different. In theory, they support arbitrary baud rates in their Termios API much like the BSDs, but in practice this doesn't work with many hardware devices, as it's dependent on driver support. Instead, Apple added the `IOSSIOSPEED` ioctl in Mac OS X 10.4, which can set the baud rate to an arbitrary value. As the oldest macOS version supported by Rust is 10.7, it's available on all Mac platforms.

This API requires the port to be set into raw mode with `cfmakeraw`, and must be done after every call to `tcsetattr`, as that will reset the baud rate. Additionally, there is no way to retrieve the actual baud rate from the OS. This is therefore the clunkiest API of any platform.
Loading