# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2021"
rust-version = "1.84"
name = "meshtastic"
version = "0.1.8"
authors = ["Adam McQuilkin"]
build = "build.rs"
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A Rust library for communicating with and configuring Meshtastic devices."
homepage = "https://meshtastic.org/"
documentation = "https://docs.rs/heapless"
readme = "README.md"
keywords = [
    "meshtastic",
    "mesh",
    "lora",
    "tcp",
    "serial",
]
categories = [
    "embedded",
    "config",
    "encoding",
]
license = "GPL-3.0"
repository = "https://github.com/meshtastic/rust"

[package.metadata.docs.rs]
features = ["bluetooth-le"]
rustdoc-args = [
    "--cfg",
    "docsrs",
]

[features]
bluetooth-le = [
    "dep:uuid",
    "dep:btleplug",
    "dep:futures",
    "dep:bluez-async",
]
default = [
    "serde",
    "tokio",
]
gen = [
    "dep:prost-build",
    "dep:protoc-bin-vendored",
    "dep:walkdir",
]
serde = [
    "dep:serde",
    "dep:serde_json",
]
tokio = [
    "dep:tokio",
    "dep:tokio-serial",
    "dep:tokio-util",
]
ts-gen = [
    "serde",
    "dep:specta",
    "dep:specta-typescript",
]

[lib]
name = "meshtastic"
path = "src/lib.rs"
doctest = false

[[example]]
name = "basic_ble"
path = "examples/basic_ble.rs"
required-features = [
    "bluetooth-le",
    "tokio",
]

[[example]]
name = "basic_serial"
path = "examples/basic_serial.rs"
required-features = ["tokio"]

[[example]]
name = "basic_tcp"
path = "examples/basic_tcp.rs"
required-features = ["tokio"]

[[example]]
name = "generate_typescript_types"
path = "examples/generate_typescript_types.rs"
required-features = [
    "ts-gen",
    "tokio",
]

[[example]]
name = "message_filtering"
path = "examples/message_filtering.rs"
required-features = ["tokio"]

[dependencies.btleplug]
version = "0.11.7"
features = ["serde"]
optional = true

[dependencies.futures]
version = "0.3.31"
optional = true

[dependencies.futures-util]
version = "0.3.31"

[dependencies.log]
version = "0.4.25"

[dependencies.prost]
version = "0.14"

[dependencies.rand]
version = "0.9.0"

[dependencies.serde]
version = "1.0"
features = ["derive"]
optional = true

[dependencies.serde_json]
version = "1.0"
optional = true

[dependencies.specta]
version = "=2.0.0-rc.22"
features = [
    "derive",
    "export",
    "chrono",
]
optional = true

[dependencies.specta-typescript]
version = "=0.0.9"
optional = true

[dependencies.thiserror]
version = "2.0.11"

[dependencies.tokio]
version = "1.43.0"
features = ["full"]
optional = true

[dependencies.tokio-serial]
version = "5.4.5"
optional = true

[dependencies.tokio-util]
version = "0.7.13"
optional = true

[dependencies.uuid]
version = "1.12.1"
optional = true

[dev-dependencies.fern]
version = "0.7.1"
features = ["colored"]

[dev-dependencies.humantime]
version = "2.1.0"

[build-dependencies.prost-build]
version = "0.14"
optional = true

[build-dependencies.protoc-bin-vendored]
version = "3.1.0"
optional = true

[build-dependencies.walkdir]
version = "2.5.0"
optional = true

[target.'cfg(target_os = "linux")'.dependencies.bluez-async]
version = "=0.8.0"
optional = true

[lints.rust]
missing_docs = "warn"
