-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCargo.toml
More file actions
86 lines (75 loc) · 2.41 KB
/
Copy pathCargo.toml
File metadata and controls
86 lines (75 loc) · 2.41 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
[package]
name = "numby"
version = "0.1.8"
edition = "2021"
description = "A powerful natural language calculator with a terminal user interface"
repository = "https://github.com/vivy-company/numby"
license = "MIT"
keywords = ["calculator", "cli", "tui", "natural-language", "math"]
categories = ["command-line-utilities", "mathematics"]
[lib]
name = "numby"
path = "src/lib.rs"
crate-type = ["lib", "staticlib", "cdylib"]
[[bin]]
name = "numby"
path = "src/main.rs"
[features]
default = ["desktop"]
desktop = ["ratatui", "crossterm", "arboard"]
visionos = []
android = ["jni"]
[dependencies]
regex = "1.10"
fasteval2 = "2.1"
ropey = "1.6"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
nu-ansi-term = "0.50"
clap = { version = "4.0", features = ["derive"] }
thiserror = "1.0"
anyhow = "1.0"
lazy_static = "1.4"
dirs = "5.0"
fluent-bundle = "0.15"
fluent-templates = "0.10"
unic-langid = "0.9"
once_cell = "1.19"
ureq = { version = "2.10", features = ["json"] }
chrono = { version = "0.4", features = ["serde", "clock"] }
chrono-tz = "0.8"
# Desktop-only dependencies (uses mio which doesn't support visionOS)
ratatui = { version = "0.26", optional = true }
crossterm = { version = "0.27", optional = true }
arboard = { version = "3.4", optional = true }
# Android-only dependencies
jni = { version = "0.21", optional = true }
[dev-dependencies]
approx = "0.5"
# Default release profile with LTO disabled to allow custom profiles to override
# This profile serves as base configuration - use release-lib or release-cli instead
[profile.release]
opt-level = 3
lto = false # Disabled here so child profiles can enable it independently
codegen-units = 1
panic = "abort"
strip = true
# Size-optimized profile for staticlib (macOS app)
# Minimizes binary size for embedding in app bundle
# Use: RUSTFLAGS="-C embed-bitcode=no" cargo build --profile release-lib --lib
# Note: LTO disabled for lib because embed-bitcode=no conflicts with LTO
[profile.release-lib]
inherits = "release"
opt-level = "z" # Optimize for size
lto = false # Disabled because embed-bitcode=no conflicts with LTO
codegen-units = 1
strip = true
# Performance-optimized profile for CLI binary
# Maximizes runtime performance for standalone CLI
# Use: cargo build --profile release-cli --bin numby
[profile.release-cli]
inherits = "release"
opt-level = 3 # Optimize for speed
lto = true # Enable LTO for better optimization
codegen-units = 1
strip = true