-
Notifications
You must be signed in to change notification settings - Fork 18
/
Cargo.toml
198 lines (172 loc) · 8.62 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
[package]
name = "robrix"
authors = [
"Kevin Boos <[email protected]>",
"Robius Project Maintainers",
]
description = "A Matrix chat client written using Makepad + Robius app dev framework in Rust."
documentation = "https://docs.rs/robrix"
edition = "2021"
homepage = "https://robius.rs/"
keywords = ["matrix", "chat", "client", "robrix", "robius"]
license = "MIT"
readme = "README.md"
repository = "https://github.com/project-robius/robrix"
version = "0.0.1-pre-alpha"
metadata.makepad-auto-version = "zqpv-Yj-K7WNVK2I8h5Okhho46Q="
[dependencies]
makepad-widgets = { git = "https://github.com/makepad/makepad", branch = "rik" }
## Including this crate automatically configures all `robius-*` crates to work with Makepad.
robius-use-makepad = "0.1.1"
robius-open = "0.1.2"
## A fork of the `directories` crate that adds support for Android by using our `robius-android-env` crate.
robius-directories = "5.0.1"
robius-location = { git = "https://github.com/project-robius/robius-location" }
anyhow = "1.0"
chrono = "0.4"
clap = { version = "4.0.16", features = ["derive"] }
crossbeam-channel = "0.5.10"
crossbeam-queue = "0.3.8"
eyeball = { version = "0.8.8", features = ["tracing"] }
eyeball-im = "0.5.0"
futures-util = "0.3"
htmlize = "1.0.5"
imbl = { version = "3.0.0", features = ["serde"] } # same as matrix-sdk-ui
imghdr = "0.7.0"
linkify = "0.10.0"
matrix-sdk = { git = "https://github.com/matrix-org/matrix-rust-sdk", default-features = false, features = [ "experimental-sliding-sync", "e2e-encryption", "automatic-room-key-forwarding", "markdown", "sqlite", "rustls-tls", "bundled-sqlite" ] }
matrix-sdk-ui = { git = "https://github.com/matrix-org/matrix-rust-sdk", default-features = false, features = [ "rustls-tls" ] }
rand = "0.8.5"
rangemap = "1.5.0"
serde = "1.0"
serde_json = "1.0"
tokio = { version = "1.33.0", features = ["macros", "rt-multi-thread"] }
tracing-subscriber = "0.3.17"
unicode-segmentation = "1.11.0"
url = "2.5.0"
emojis = "0.6.1"
###################################################################################################
#### Note: we now enable the usage of `rustls-tls` and the `bundled-sqlite` features in the 2 ####
#### matrix crate dependencies, so the below android- and windows-specific dependencies ####
#### are no longer needed. However, if you wish to disable those features, you would ####
#### need to re-enable the below target-specific dependencies. ####
###################################################################################################
## On Android, we currently build OpenSSL and SQLite from
## the vendored source code, because on macOS hosts there aren't yet
## prebuilt versions readily available, nor easily-configured pkg-config sysroots
## like there are on Linux.
##
## Even though we don't directly depend on these crates in Robrix,
## specifying them here with the `vendored`/`bundled` features
## will cause cargo to enable those features across the entire build
## (called "feature unification", see https://doc.rust-lang.org/cargo/reference/features.html#feature-unification),
## meaning that any other crate that depends on them will also use the vendored versions.
##
## Technically, we don't need these when building for Android on Linux systems,
## but there's no way to specify that in Cargo.toml, so we just always include them.
## Plus, this makes builds more reproducible across host systems,
## and avoids the issue of needing to set up pkg-config sysroots on Linux.
##
# [target.'cfg(target_os = "android")'.dependencies]
# openssl = { version = "*", features = ["vendored"] }
# rusqlite = { version = "*", features = ["bundled"] }
## On Windows, there are prebuilt versions of sqlite3 available,
## but building it from bundled source is just easier and works out of the box.
##
## If you don't want to include sqlite3 as a static library built from source,
## you can comment out the below lines and link against a prebuilt version.
## One way to easily do this is to install sqlite using a package manager like `chocolatey`
## (see <https://stackoverflow.com/a/76427629>). Another way is to or download it
## directly from the sqlite website: <https://www.sqlite.org/download.html>,
## where you'll want the 64-bit DLL (x64) under "Precompiled Binaries for Windows".
## You'll need to add the directory of that prebuilt sqlite DLL to your path env variable.
##
# [target.'cfg(target_os = "windows")'.dependencies]
# rusqlite = { version = "*", features = ["bundled"] }
[package.metadata.docs.rs]
all-features = true
# Temporarily include all debug info even for release builds.
[profile.release]
debug = "full"
## Configuration for `cargo packager`
[package.metadata.packager]
product_name = "Robrix"
identifier = "org.robius.robrix"
category = "SocialNetworking"
authors = ["Project Robius <[email protected]>", "Kevin Boos <[email protected]>"]
publisher = "robius"
license_file = "LICENSE-MIT"
copyright = "Copyright 2023-2024, Project Robius"
homepage = "https://github.com/project-robius"
### Note: there is an 80-character max for each line of the `long_description`.
long_description = """
Robrix is a multi-platform Matrix chat client written in pure Rust
using the Makepad UI framework (https://github.com/makepad/makepad)
and the Project Robius app dev framework and platform abstractions
(https://github.com/project-robius).
Robrix runs on all major desktop and mobile platforms:
macOS, Windows, Linux, Android, and iOS.
"""
icons = ["./packaging/robrix_logo_alpha.png"]
out_dir = "./dist"
## The below command primarily uses cargo-metadata to determine the path of the `makepad_widgets` crate on the host build system,
## and copies the `makepad-widgets/resources` directory to the `./dist/resources/makepad_widgets` directory.
## We also copy the Robrix project's `resources/` directory to the `./dist/resources/robrix` directory.
##
## This is necessary because the `cargo packager` command only supports defining resources at a known path
## (see the below `resources = [...]` block below),
## so we need to copy the resources to a known fixed (static) path before packaging,
## such that cargo-packager can locate them and include them in the final package.
before-packaging-command = """
robius-packaging-commands before-packaging \
--force-makepad \
--binary-name robrix \
--path-to-binary ./target/release/robrix
"""
## See the above paragraph comments for more info on how we create/populate the below `src` directories.
resources = [
{ src = "./dist/resources/makepad_widgets", target = "makepad_widgets" },
{ src = "./dist/resources/robrix", target = "robrix" },
]
## We then build the entire Robrix project and set the `MAKEPAD`/`MAKEPAD_PACKAGE_DIR` env vars to the proper value.
## * For macOS app bundles, this should be set to `.` because we set the `apple_bundle` cfg option
## for Makepad, which causes Makepad to look for resources in the `Contents/Resources/` directory,
## which is where the resources are located for an Apple app bundle (`.app` and `.dmg`).
## * For Debian `.deb` packages, this should be set to `/usr/lib/<main-binary-name>`,
## which is currently `/usr/lib/robrix`.
## This is the directory in which `dpkg` copies app resource files to when installing the `.deb` package.
## * On Linux, we also strip the binaries of unneeded content, as required for Debian packages.
## * For Debian and Pacman (still a to-do!) packages, we also auto-generate the list of dependencies required by Robrix.
##
before-each-package-command = """
robius-packaging-commands before-each-package \
--force-makepad \
--binary-name robrix \
--path-to-binary ./target/release/robrix
"""
deep_link_protocols = [
{ schemes = ["robrix", "matrix"], role = "viewer" }, ## `name` is left as default
]
[package.metadata.packager.deb]
depends = "./dist/depends_deb.txt"
desktop_template = "./packaging/robrix.desktop"
section = "utils"
[package.metadata.packager.macos]
minimum_system_version = "11.0"
frameworks = [ ]
info_plist_path = "./packaging/Info.plist"
entitlements = "./packaging/Entitlements.plist"
signing_identity = "Developer ID Application: AppChef Inc. (SFVQ5V48GD)"
## Configuration for `cargo packager`'s generation of a macOS `.dmg`.
[package.metadata.packager.dmg]
background = "./packaging/Robrix macOS dmg background.png"
window_size = { width = 960, height = 540 }
app_position = { x = 200, y = 250 }
application_folder_position = { x = 760, y = 250 }
## Configuration for `cargo packager`'s generation of a Windows `.exe` setup installer.
[package.metadata.packager.nsis]
## See this: <https://nsis.sourceforge.io/Docs/Chapter4.html#varconstant>
appdata_paths = [
"$APPDATA/$PUBLISHER/$PRODUCTNAME",
"$LOCALAPPDATA/$PRODUCTNAME",
]