-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathCargo.toml
184 lines (158 loc) · 6.98 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
[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" }
makepad-widgets = { git = "https://github.com/kevinaboos/makepad", branch = "new_hits_old_redraw" }
## 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", "sso-login" ] }
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"
bytesize = "1.3.0"
bitflags = "2.6.0"
indexmap = "2.6.0"
[package.metadata.docs.rs]
all-features = true
# Temporarily include all debug info even for release builds.
[profile.release]
debug = "full"
## Patch the imbl crate to use our fake-backported version of `imbl`,
## such that we get all the new changes after v3.0.0 but still pretend that it's v3.0.0.
[patch.crates-io]
imbl = { git = "https://github.com/project-robius/imbl.git", branch = "robius" }
## 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",
]
[lints.rust]
keyword_idents_2024 = "forbid"
non_ascii_idents = "forbid"
non_local_definitions = "forbid"
unsafe_op_in_unsafe_fn = "forbid"
unexpected_cfgs = "warn"
unnameable_types = "warn"
unused_import_braces = "warn"
## Configuration for clippy lints.
[lints.clippy]
collapsible_if = "allow"
collapsible_else_if = "allow"
too_many_arguments = "allow"
blocks_in_conditions = "allow"
used_underscore_binding = "allow"
module_name_repetitions = "allow"