Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
144 lines (132 loc) · 4.22 KB
/
Copy pathCargo.toml
File metadata and controls
144 lines (132 loc) · 4.22 KB
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
[workspace]
resolver = "2"
members = [
"crates/shared",
"crates/ui",
"crates/resources",
"crates/build-config",
"crates/platform/linux",
"crates/platform/android",
"crates/platform/ios",
"crates/platform/windows",
"crates/platform/macos",
"crates/platform/web",
"apps/example",
"apps/server",
]
[workspace.package]
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/Rustinaz/code-template"
homepage = "https://sina-khanzadeh.ir"
authors = ["Sina Khanzadeh <khanzadeh.1377@gmail.com>"]
description = "Rustinaz - a Rust-first cross-platform app template (Linux, Windows, macOS, Android, iOS, web)"
[workspace.dependencies]
# Core dependencies
tokio = { version = "1.40", features = ["full", "tracing"] }
anyhow = "1.0"
thiserror = "1.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt"] }
once_cell = "1.19"
parking_lot = "0.12"
async-trait = "0.1"
futures = "0.3"
# Pure Rust, so these cross-compile to every target in this workspace without
# pulling in a C toolchain. Used for password hashing and salt generation.
argon2 = "0.5"
password-hash = { version = "0.5", features = ["rand_core"] }
rand = "0.8"
# Serialization
toml = "0.8"
ron = "0.8"
# UI dependencies
egui = { version = "0.29", features = ["accesskit", "persistence"] }
eframe = { version = "0.29", default-features = false, features = [
"accesskit",
"default_fonts",
"glow",
"wayland",
"x11",
# Android/iOS backends. `android-native-activity` makes winit build the
# `native-activity` glue, which is what the APK in `android-app/` loads.
"android-native-activity",
] }
winit = { version = "0.30", default-features = false, features = [
"rwh_06",
"android-native-activity",
"x11",
"wayland",
] }
# Build & Config
clap = { version = "4.3", features = ["derive", "env"] }
config = { version = "0.14", features = ["toml"] }
directories = "5.0"
semver = "1.0"
# Testing
pretty_assertions = "1.4"
# Platform-specific
android-activity = { version = "0.6.1", features = ["native-activity"] }
# Must match the `jni` that `android-activity` 0.6 resolves to. Two versions in
# the graph means two incompatible `JNIEnv` types, which does not compile.
jni = "0.22"
# The browser bindings. `js-sys` is here because `web-sys` re-exports through
# it; nothing in this workspace uses it directly yet, but `js_sys::Function`
# appears in the web DOM bindings.
wasm-bindgen = "0.2"
js-sys = "0.3"
# Every entry here is a feature that unlocks a *method*, not just a type.
# `web-sys` generates a method only when its feature is on, so a missing entry
# shows up as "no method named `class_list` / `style` / `head`" rather than as a
# missing import. Each one is required by `crates/ui/src/platform/web.rs`.
web-sys = { version = "0.3", features = [
"AddEventListenerOptions",
"CssStyleDeclaration",
"Document",
"DomTokenList",
"Element",
"Event",
"EventListenerOptions",
"EventTarget",
"HtmlCollection",
"HtmlElement",
"HtmlHeadElement",
"Node",
"Text",
"Window",
] }
windows = { version = "0.58", features = [
"Win32_Foundation",
"Win32_System_SystemInformation",
] }
# Utilities
uuid = { version = "1.8", features = ["v4", "serde", "fast-rng"] }
chrono = { version = "0.4", features = ["serde"] }
# A drop-in `std::time` that does not abort on `wasm32-unknown-unknown`, where
# `Instant::now()` and `SystemTime::now()` are unsupported. On every other
# target it is a plain `pub use std::time`, so it costs nothing off the web.
web-time = "1.1"
url = "2.5"
regex = "1.10"
reqwest = { version = "0.12", features = ["json", "rustls-tls"], default-features = false }
opener = "0.7"
[workspace.lints]
rust.unused = "warn"
clippy = { all = "warn", pedantic = "warn", nursery = "warn", cargo = "warn" }
rustdoc = { all = "warn" }
[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
strip = "symbols"
# `panic = "abort"` is deliberately NOT set: it would make `cargo test --release`
# unusable, and a template that cannot be tested in release mode is a trap.
[profile.dev]
opt-level = 0
debug = true
[profile.test]
opt-level = 2
debug = true