Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
133 lines (117 loc) · 5.44 KB
/
Copy pathCargo.toml
File metadata and controls
133 lines (117 loc) · 5.44 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
[workspace]
members = ["engine", "web", "doc", "relay", "sync-web"]
[workspace.package]
version = "1.0.3"
[package]
name = "omacus"
version.workspace = true
edition = "2024"
license = "MIT"
authors = ["Avinash Joshi <avinash@hey.com>"]
description = "A notepad calculator: units, currencies, time zones and plain words"
keywords = ["calculator", "notepad", "units", "currency", "omarchy"]
categories = ["mathematics", "gui"]
repository = "https://github.com/avinashjoshi/omacus"
homepage = "https://github.com/avinashjoshi/omacus"
[dependencies]
omacus-engine = { path = "engine" }
omacus-doc = { path = "doc" }
omacus-sync-web = { path = "sync-web" }
dirs = "7.0.0"
# The renderer is chosen per target below. glow (OpenGL) is not listed here:
# a Windows dependency line adds to this one, and would still compile glow in.
eframe = { version = "0.37.0", default-features = false, features = ["wayland", "x11", "clipboard", "links"] }
miniz_oxide = "0.8"
image = { version = "0.25", default-features = false, features = ["png"] }
serde = { version = "1.0.229", features = ["derive"] }
serde_json = "1.0.154"
sha2 = "0.11"
base64 = "0.22"
# Verifies the signed update manifest. The signing key is not in this crate.
ed25519-dalek = "3.0.0"
toml = "1.1.8"
ureq = "3.4.2"
# Folder picker for the PDF export directory. The default backend is the XDG
# file portal (no GTK headers). macOS and Windows use their own dialogs.
rfd = { version = "0.15.4", default-features = false, features = ["xdg-portal", "async-std"] }
clap = { version = "4.5", features = ["derive"] }
clap_complete = "4.5"
# stdio MCP server (`omacus mcp`). Default features pull a client we don't run.
rmcp = { version = "3.7.0", default-features = false, features = ["server", "macros", "transport-io"] }
tokio = { version = "1", default-features = false, features = ["rt", "macros", "io-util", "sync"] }
qrcode = { version = "0.14", default-features = false }
rqrr = "0.9"
zeroize = "1"
arboard = "3"
getrandom = "0.2"
[build-dependencies]
miniz_oxide = "0.8"
# The icon and version details in omacus.exe (Explorer, the taskbar, Start).
[target.'cfg(windows)'.build-dependencies]
winresource = "0.1"
# OpenGL everywhere except Windows, which uses Direct3D 12 (below).
[target.'cfg(not(windows))'.dependencies]
eframe = { version = "0.37.0", default-features = false, features = ["glow"] }
# Share links clicked on macOS arrive as an Apple Event (see src/links.rs).
[target.'cfg(unix)'.dependencies]
libc = "0.2"
[target.'cfg(target_os = "macos")'.dependencies]
objc2 = "0.6"
security-framework = { version = "3", features = ["OSX_10_15"] }
objc2-foundation = { version = "0.3", default-features = false, features = ["std", "NSAppleEventDescriptor", "NSAppleEventManager", "NSString", "objc2-core-services"] }
[target.'cfg(windows)'.dependencies]
# Direct3D 12 on Windows: OpenGL 2 is often missing there (virtual machines,
# Remote Desktop, no GPU driver), and D3D falls back to Windows' own software
# renderer when there's no GPU. glow is not enabled, so that OpenGL backend
# is not compiled into the Windows binary.
eframe = { version = "0.37.0", default-features = false, features = ["wgpu_no_default_features"] }
wgpu = { version = "30", default-features = false, features = ["dx12", "std", "wgsl"] }
windows-sys = { version = "0.61", features = ["Win32_System_Console", "Win32_System_Registry", "Win32_UI_WindowsAndMessaging", "Win32_Security_Cryptography", "Win32_Storage_FileSystem", "Win32_Foundation", "Win32_System_IO"] }
# Updates on Windows arrive as the release .zip.
zip = { version = "9.0", default-features = false, features = ["deflate"] }
[dev-dependencies]
omacus-engine = { path = "engine" }
omacus-relay = { path = "relay" }
zip = { version = "9.0", default-features = false, features = ["deflate"] }
[profile.release]
strip = true
# Whole-program optimisation: about 1.5 MB smaller than "thin", and just as fast.
# (opt-level "s" would save 2.5 MB more but makes typing ~40% slower; not worth it.)
lto = "fat"
codegen-units = 1
# `cargo deb` -> .deb for Ubuntu/Debian
[package.metadata.deb]
section = "utils"
maintainer = "Avinash Joshi <avinash@hey.com>"
extended-description = """\
Type on the left, results appear on the right. Understands units, currencies, \
percentages, variables, totals, dates and time zones, with multiple pages that \
save as you type."""
assets = [
["target/release/omacus", "usr/bin/", "755"],
["assets/omacus.desktop", "usr/share/applications/", "644"],
["assets/icon-256.png", "usr/share/icons/hicolor/256x256/apps/omacus.png", "644"],
]
# `cargo bundle` -> Omacus.app for macOS
[package.metadata.bundle]
name = "Omacus"
identifier = "dev.omacus.Omacus"
icon = ["assets/icon-256.png", "assets/icon-512.png"]
category = "public.app-category.productivity"
short_description = "A notepad calculator"
# omacus:// share links open the app.
[package.metadata.bundle.osx]
url_schemes = ["omacus"]
# `cargo generate-rpm` -> .rpm for Fedora/openSUSE
[package.metadata.generate-rpm]
assets = [
{ source = "target/release/omacus", dest = "/usr/bin/omacus", mode = "755" },
{ source = "assets/omacus.desktop", dest = "/usr/share/applications/omacus.desktop", mode = "644" },
{ source = "assets/icon-256.png", dest = "/usr/share/icons/hicolor/256x256/apps/omacus.png", mode = "644" },
]
# `./install.sh` from a source checkout: about as fast, a few MB bigger, and built in
# a fraction of the time (the release profile's whole-program pass is for downloads).
[profile.local]
inherits = "release"
lto = "thin"
codegen-units = 16