################################################################################ # Copyright (c) 2023 Contributors to the Eclipse Foundation # # See the NOTICE file(s) distributed with this work for additional # information regarding copyright ownership. # # This program and the accompanying materials are made available under the # terms of the Apache License Version 2.0 which is available at # https://www.apache.org/licenses/LICENSE-2.0 # # SPDX-License-Identifier: Apache-2.0 ################################################################################ [package] categories = ["api-bindings"] description = "The Eclipse uProtocol Rust Language Library" edition = "2021" include = [ "/src/*", "/examples/*", "/up-spec/up-core-api/uprotocol/*", "/build.rs", "/Cargo.toml", "/README.md", ] keywords = ["uProtocol", "SDK", "communication"] license = "Apache-2.0" name = "up-rust" readme = "README.md" repository = "https://github.com/eclipse-uprotocol/up-rust" rust-version = "1.74.1" version = "0.2.0" [features] default = ["communication"] communication = ["usubscription", "dep:thiserror", "tokio/sync", "tokio/time"] udiscovery = [] usubscription = [] utwin = [] util = ["tokio/sync"] [dependencies] async-trait = { version = "0.1" } bytes = { version = "1.6.1" } mediatype = "0.19" protobuf = { version = "3.3", features = ["with-bytes"] } rand = { version = "0.8" } thiserror = { version = "1.0.52", optional = true } tokio = { version = "1.35", default-features = false, optional = true } tracing = { version = "0.1.35", default-features = false, features = [ "log", "std", ] } uriparse = { version = "0.6" } uuid-simd = { version = "0.8", default-features = false, features = [ "std", "detect", ] } [build-dependencies] protobuf-codegen = { version = "3.3" } protoc-bin-vendored = { version = "3.0" } [dev-dependencies] mockall = "0.12.1" test-case = { version = "3.3" } tokio = { version = "1.35", default-features = false, features = [ "macros", "rt", "rt-multi-thread", "sync", "time", ] } [profile.release] opt-level = 3 lto = "fat" codegen-units = 1 [package.metadata.docs.rs] all-features = true [[example]] name = "simple_notify" required-features = ["communication", "util"] [[example]] name = "simple_publish" required-features = ["communication", "util"] [[example]] name = "simple_rpc" required-features = ["communication", "util"]