-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCargo.toml
108 lines (93 loc) · 2.94 KB
/
Cargo.toml
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
[package]
name = "pfwx"
version = "0.2.12"
authors = ["金千枝(深圳)软件技术有限公司. All rights reserved."]
edition = "2021"
license = "BSD-2-Clause"
description = "PowerFramework"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
crate-type = ["cdylib"]
[dependencies]
pbni-rs = { version = "0.1.0", default-features = false, features = [
"pbx",
"global_function",
"nonvisualobject",
] }
thiserror = "1.0.38"
bytes = "1.3.0"
libloading = "0.7.4"
lazy_static = "1.4.0"
encoding = { version = "0.2.33", optional = true }
# trace
tracing = { version = "0.1.37", optional = true }
tracing-subscriber = { version = "0.3.16", optional = true }
tracing-appender = { version = "0.2.2", optional = true }
console-subscriber = { version = "0.1.8", optional = true }
widestring = { version = "1.0.2", optional = true }
# reactor
tokio = { version = "1.23.0", features = [
"sync",
"time",
"rt",
"macros",
], optional = true }
futures-util = { version = "0.3.25", optional = true }
windows = { version = "=0.48.0", features = [
"Win32_Foundation",
"Win32_UI_WindowsAndMessaging",
"Win32_Graphics_Gdi",
"Win32_System_LibraryLoader",
"Win32_System_Threading",
"Win32_System_WindowsProgramming",
"Win32_Security",
"Win32_System_Diagnostics_Debug",
], optional = true }
backtrace = { version = "0.3.67", optional = true }
# http
reqwest = { version = "0.12.4", features = [
"native-tls-vendored",
"multipart",
"stream",
"cookies",
"socks",
"gzip",
"brotli",
"deflate",
], optional = true }
mime = { version = "0.3.16", optional = true }
http-body = { version = "1.0.0", optional = true }
# mqtt
paho-mqtt = { version = "=0.12.4", optional = true }
# parser
dwparser = { version = "0.1.5", features = ["full"], optional = true }
serde_json = { version = "1.0.91", optional = true }
[build-dependencies]
winres = "0.1.12"
[features]
default = ["full"]
full = ["http", "mqtt", "parser"]
unchecked = ["pbni-rs/unchecked"]
trace = [
"tracing",
"tracing-subscriber",
"tracing-appender",
"console-subscriber",
"tokio/tracing",
"widestring",
]
reactor = ["tokio", "futures-util", "windows", "backtrace"]
parser = ["dwparser", "serde_json"]
http = ["reactor", "reqwest", "mime", "encoding", "http-body"]
mqtt = ["reactor", "paho-mqtt", "encoding"]
[patch.crates-io]
pbni-rs = { git = "https://github.com/gaoqiangz/pbni-rs.git", branch = "syslib" }
pbni-codegen = { git = "https://github.com/gaoqiangz/pbni-rs.git", branch = "syslib" }
# 解决`openssl`链接问题
paho-mqtt-sys = { git = "https://github.com/gaoqiangz/paho.mqtt.rust.git" }
# 正式发布时使用最优化编译模式,减少二进制大小
[profile.release]
opt-level = "z" # Optimize for size
lto = true # Enable Link Time Optimization
codegen-units = 1 # Reduce number of codegen units to increase optimizations
# panic = "abort" # Abort on panic