tauri-plugin-serialplugin 4.2.0

Tauri plugin for serial port access (desktop and Android).
[workspace]
members = ["crates/android-usb-serial", "crates/serial-codec", "crates/serialplugin-core"]
exclude = [
    "examples/serialport-test/src-tauri",
    "examples/usb-driver-tester/rust",
]
resolver = "2"

[package]
name = "tauri-plugin-serialplugin"
version = "4.2.0"
description = "Tauri plugin for serial port access (desktop and Android)."
edition = "2021"
authors = ["s00d"]
license = "Apache-2.0 OR MIT"
rust-version = "1.90"
links = "tauri-plugin-serialplugin"
readme = "README.md"
repository = "https://github.com/s00d/tauri-plugin-serialplugin"
homepage = "https://github.com/s00d/tauri-plugin-serialplugin"
documentation = "https://docs.rs/tauri-plugin-serialplugin"
keywords = ["tauri-plugin", "serial", "serialport", "usb", "android"]
categories = ["hardware-support", "api-bindings"]
# Keep crate lean for crates.io; examples/tests/tooling stay in git.
exclude = [
    "examples/**",
    ".github/**",
    "docs/**",
    "banner.png",
    "tests/**",
    "scripts/**",
    "crates/**",
    "coverage/**",
    "test-results/**",
    "android/src/test/**",
    "android/BUILD_INSTRUCTIONS.md",
    # Rust unit tests (src/lib.rs only declares them under #[cfg(test)]).
    "src/tests/**",
    # npm package and JS tooling.
    "guest-js/**",
    "dist-js/**",
    "node_modules/**",
    "package.json",
    "pnpm-lock.yaml",
    "pnpm-workspace.yaml",
    ".npmrc",
    ".release-it.json",
    "tsconfig*.json",
    "vite.config.ts",
    "vitest.config.ts",
    "PUBLISHING.md",
]

[features]
android-test-harness = ["serialplugin-core/android-test-harness"]
# Serial over Bluetooth LE (Nordic UART Service), desktop, iOS and Android. Off by default:
# on Linux it needs libdbus (BlueZ).
ble = ["serialplugin-core/ble"]

[package.metadata.docs.rs]
rustc-args = [ "--cfg", "docsrs" ]
rustdoc-args = [ "--cfg", "docsrs" ]
# Desktop APIs are the common docs.rs surface; Android JNI is cfg-gated.
targets = ["x86_64-unknown-linux-gnu"]
# Document the ble:// API too (btleplug builds on docs.rs: libdbus is installed there).
features = ["ble"]

[package.metadata.platforms.support]
windows = { level = "full", notes = "" }
linux = { level = "full", notes = "" }
macos = { level = "full", notes = "" }
android = { level = "full", notes = "" }
ios = { level = "partial", notes = "No local serial/USB API on iOS; serial-over-TCP (tcp://host:port) works." }

[build-dependencies]
tauri-plugin = { version = "2", features = [ "build" ] }

[dependencies]
tauri = { version = "2" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serial-codec = { path = "crates/serial-codec", version = "0.1.0" }
# Everything that is not Tauri glue lives here (usable from plain Rust).
# `tauri`: the 4.0.0 API of the re-exported core modules (Tauri `Channel` helpers,
# `From<PluginInvokeError>` on Android).
serialplugin-core = { path = "crates/serialplugin-core", version = "0.2.0", features = ["tauri"] }

[target.'cfg(target_os = "android")'.dependencies]
# The core's log_* macros expand to `::log::…` on Android; android_log.rs installs the logcat sink.
log = { version = "0.4", features = ["std"] }

[dev-dependencies]
# `test` feature only for this crate's unit tests — keep it off the published dependency graph.
tauri = { version = "2", features = ["test"] }

[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dev-dependencies]
serialport = "4.10"

[profile.release]
codegen-units = 1
lto = true
incremental = false
opt-level = "s"