Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
112 lines (101 loc) · 3.79 KB
/
Copy pathCargo.toml
File metadata and controls
112 lines (101 loc) · 3.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
[workspace]
members = ["crates/android-usb-serial", "crates/serial-codec", "crates/serialplugin-core", "crates/serialplugin-testing"]
exclude = [
"examples/serialport-test/src-tauri",
"examples/usb-driver-tester/rust",
]
resolver = "2"
[package]
name = "tauri-plugin-serialplugin"
version = "4.2.6"
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"
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/**",
# Local tooling config (cargo-mutants, nextest).
".cargo/**",
".config/**",
"docs/**",
"banner.png",
# Rust (tests/it/, one binary) and TS tests stay in git.
"tests/**",
"scripts/**",
"crates/**",
"coverage/**",
"test-results/**",
"android/src/test/**",
"android/BUILD_INSTRUCTIONS.md",
# Local-only PIT mutation testing (`./gradlew -I pitest.init.gradle pitestDebug`).
"android/pitest.init.gradle",
# npm package and JS tooling.
"guest-js/**",
"dist-js/**",
"node_modules/**",
"package.json",
"pnpm-lock.yaml",
"pnpm-workspace.yaml",
"tsconfig*.json",
"vite.config.ts",
"vitest.config.ts",
"PUBLISHING.md",
"TESTING.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.2" }
# 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.5", 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 integration tests — keep it off the published dependency graph.
tauri = { version = "2", features = ["test"] }
# Model tests (tests/it/model_*.rs). One proptest 1.x per build: the workspace crates pin
# theirs below 1.12.
proptest = "1.10"
# The mock app's ACL is resolved from the plugin's permission files.
toml = "1.2"
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dev-dependencies]
serialplugin-testing = { path = "crates/serialplugin-testing" }
serialport = "4.10.1"
[profile.release]
codegen-units = 1
lto = true
incremental = false
opt-level = "s"