[package]
edition = "2024"
rust-version = "1.97"
name = "km003c-lib"
version = "0.4.0"
authors = ["Danila Gornushko <me@okhsunrog.dev>"]
build = false
exclude = [
"Cargo.lock",
"*.parquet",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Protocol parser and async USB library for the ChargerLAB POWER-Z KM003C"
documentation = "https://docs.rs/km003c-lib"
readme = "README.md"
keywords = [
"usb",
"usb-c",
"power-meter",
"km003c",
"async",
]
categories = [
"hardware-support",
"asynchronous",
"api-bindings",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/okhsunrog/km003c-rs"
[features]
default = []
python = ["dep:pyo3"]
serde = [
"dep:serde",
"uom/serde",
]
usbpd = ["dep:usbpd"]
[lib]
name = "km003c_lib"
crate-type = [
"cdylib",
"rlib",
]
path = "src/lib.rs"
[[example]]
name = "calibration_auth"
path = "examples/calibration_auth.rs"
[[example]]
name = "settings"
path = "examples/settings.rs"
[[test]]
name = "adc_tests"
path = "tests/adc_tests.rs"
[[test]]
name = "adcqueue_tests"
path = "tests/adcqueue_tests.rs"
[[test]]
name = "edge_cases"
path = "tests/edge_cases.rs"
[[test]]
name = "new_api"
path = "tests/new_api.rs"
[[test]]
name = "packet_parsing"
path = "tests/packet_parsing.rs"
[[test]]
name = "pd_tests"
path = "tests/pd_tests.rs"
[[test]]
name = "pd_trace_tests"
path = "tests/pd_trace_tests.rs"
[[test]]
name = "roundtrip"
path = "tests/roundtrip.rs"
[[test]]
name = "serialization"
path = "tests/serialization.rs"
[[test]]
name = "settings_tests"
path = "tests/settings_tests.rs"
[dependencies.aes]
version = "0.9.1"
[dependencies.bytes]
version = "1.12.1"
[dependencies.crc32fast]
version = "1.5.0"
[dependencies.hex]
version = "0.4"
[dependencies.modular-bitfield]
version = "0.13.1"
[dependencies.num_enum]
version = "0.7.6"
[dependencies.nusb]
version = "0.2.5"
features = ["tokio"]
[dependencies.pyo3]
version = "0.29.0"
features = ["extension-module"]
optional = true
[dependencies.rand]
version = "0.10.2"
[dependencies.serde]
version = "1.0.229"
features = ["derive"]
optional = true
[dependencies.strum_macros]
version = "0.28.0"
[dependencies.thiserror]
version = "2.0.19"
[dependencies.tokio]
version = "1.53.0"
features = ["full"]
[dependencies.tracing]
version = "0.1.44"
[dependencies.uom]
version = "0.36"
[dependencies.usbpd]
version = "2.0.0"
optional = true
[dependencies.zerocopy]
version = "0.8.54"
features = ["derive"]