Author: Manos Pitsidianakis [manos@pitsidianak.is]
Hash: 6476985ce6abbb9048ba5aec19f6c5144bfe89b7
Timestamp: Tue, 05 Sep 2023 12:33:28 +0000 (1 year ago)

+93 -16 +/-4 browse
Add Cross.toml for aarch64-unknown-linux-gnu builds
Add Cross.toml for aarch64-unknown-linux-gnu builds

Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
1diff --git a/Cargo.lock b/Cargo.lock
2index a8276c3..c55082f 100644
3--- a/Cargo.lock
4+++ b/Cargo.lock
5 @@ -441,6 +441,27 @@ dependencies = [
6 ]
7
8 [[package]]
9+ name = "csv"
10+ version = "1.2.2"
11+ source = "registry+https://github.com/rust-lang/crates.io-index"
12+ checksum = "626ae34994d3d8d668f4269922248239db4ae42d538b14c398b74a52208e8086"
13+ dependencies = [
14+ "csv-core",
15+ "itoa",
16+ "ryu",
17+ "serde",
18+ ]
19+
20+ [[package]]
21+ name = "csv-core"
22+ version = "0.1.10"
23+ source = "registry+https://github.com/rust-lang/crates.io-index"
24+ checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90"
25+ dependencies = [
26+ "memchr",
27+ ]
28+
29+ [[package]]
30 name = "curl"
31 version = "0.4.44"
32 source = "registry+https://github.com/rust-lang/crates.io-index"
33 @@ -1145,6 +1166,7 @@ version = "0.26.0"
34 source = "registry+https://github.com/rust-lang/crates.io-index"
35 checksum = "afc22eff61b133b115c6e8c74e818c628d6d5e7a502afea6f64dee076dd94326"
36 dependencies = [
37+ "cc",
38 "pkg-config",
39 "vcpkg",
40 ]
41 @@ -1575,6 +1597,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
42 checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
43
44 [[package]]
45+ name = "openssl-src"
46+ version = "111.27.0+1.1.1v"
47+ source = "registry+https://github.com/rust-lang/crates.io-index"
48+ checksum = "06e8f197c82d7511c5b014030c9b1efeda40d7d5f99d23b4ceed3524a5e63f02"
49+ dependencies = [
50+ "cc",
51+ ]
52+
53+ [[package]]
54 name = "openssl-sys"
55 version = "0.9.92"
56 source = "registry+https://github.com/rust-lang/crates.io-index"
57 @@ -1582,6 +1613,7 @@ checksum = "db7e971c2c2bba161b2d2fdf37080177eff520b3bc044787c7f1f5f9e78d869b"
58 dependencies = [
59 "cc",
60 "libc",
61+ "openssl-src",
62 "pkg-config",
63 "vcpkg",
64 ]
65 @@ -1815,11 +1847,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
66 checksum = "549b9d036d571d42e6e85d1c1425e2ac83491075078ca9a15be021c56b1641f2"
67 dependencies = [
68 "bitflags 2.4.0",
69+ "chrono",
70+ "csv",
71 "fallible-iterator",
72 "fallible-streaming-iterator",
73 "hashlink",
74 "libsqlite3-sys",
75+ "serde_json",
76 "smallvec",
77+ "time",
78+ "url",
79+ "uuid",
80 ]
81
82 [[package]]
83 @@ -2228,8 +2266,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
84 checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48"
85 dependencies = [
86 "deranged",
87+ "itoa",
88 "serde",
89 "time-core",
90+ "time-macros",
91 ]
92
93 [[package]]
94 @@ -2239,6 +2279,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
95 checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb"
96
97 [[package]]
98+ name = "time-macros"
99+ version = "0.2.14"
100+ source = "registry+https://github.com/rust-lang/crates.io-index"
101+ checksum = "1a942f44339478ef67935ab2bbaec2fb0322496cf3cbe84b261e06ac3814c572"
102+ dependencies = [
103+ "time-core",
104+ ]
105+
106+ [[package]]
107 name = "tinyvec"
108 version = "1.6.0"
109 source = "registry+https://github.com/rust-lang/crates.io-index"
110 diff --git a/Cross.toml b/Cross.toml
111new file mode 100644
112index 0000000..417ec8b
113--- /dev/null
114+++ b/Cross.toml
115 @@ -0,0 +1,21 @@
116+ [target.aarch64-unknown-linux-gnu]
117+ # Build with -static features.
118+ pre-build = [
119+ "export DEBIAN_FRONTEND=noninteractive ",
120+ "dpkg --add-architecture $CROSS_DEB_ARCH",
121+ "apt-get update -y",
122+ """
123+ apt-get install --assume-yes \
124+ pkg-config \
125+ libdbus-1-dev \
126+ libdbus-1-dev:$CROSS_DEB_ARCH \
127+ librust-libdbus-sys-dev \
128+ librust-libdbus-sys-dev:$CROSS_DEB_ARCH \
129+ librust-openssl-sys-dev \
130+ librust-openssl-sys-dev:$CROSS_DEB_ARCH \
131+ libsqlite3-dev:$CROSS_DEB_ARCH \
132+ libssl-dev \
133+ libssl-dev:$CROSS_DEB_ARCH \
134+ sqlite3:$CROSS_DEB_ARCH
135+ """,
136+ ]
137 diff --git a/meli/Cargo.toml b/meli/Cargo.toml
138index 5006182..a4d411a 100644
139--- a/meli/Cargo.toml
140+++ b/meli/Cargo.toml
141 @@ -33,8 +33,8 @@ bitflags = { version = "2.4", features = ["serde"] }
142 crossbeam = { version = "^0.8" }
143 flate2 = { version = "1", optional = true }
144 futures = "0.3.5"
145- indexmap = { version = "^1.6", features = ["serde-1", ] }
146- libc = { version = "0.2.125", default-features = false, features = ["extra_traits",] }
147+ indexmap = { version = "^1.6", features = ["serde-1"] }
148+ libc = { version = "0.2.125", default-features = false, features = ["extra_traits"] }
149 linkify = { version = "^0.8", default-features = false }
150 melib = { path = "../melib", version = "0.8.0" }
151 nix = { version = "^0.24", default-features = false }
152 @@ -47,15 +47,15 @@ serde_derive = "1.0.71"
153 serde_json = "1.0"
154 signal-hook = { version = "^0.3", default-features = false }
155 signal-hook-registry = { version = "1.2.0", default-features = false }
156- smallvec = { version = "^1.5.0", features = ["serde", ] }
157+ smallvec = { version = "^1.5.0", features = ["serde"] }
158 structopt = { version = "0.3.14", default-features = false }
159 svg_crate = { version = "^0.13", optional = true, package = "svg" }
160 termion = { version = "1.5.1", default-features = false }
161- toml = { version = "0.5.6", default-features = false, features = ["preserve_order", ] }
162+ toml = { version = "0.5.6", default-features = false, features = ["preserve_order"] }
163 xdg = "2.1.0"
164
165 [target.'cfg(target_os="linux")'.dependencies]
166- notify-rust = { version = "^4", default-features = false, features = ["dbus", ], optional = true }
167+ notify-rust = { version = "^4", default-features = false, features = ["dbus"], optional = true }
168
169 [build-dependencies]
170 flate2 = { version = "1", optional = true }
171 @@ -71,18 +71,23 @@ tempfile = "3.3"
172
173 [features]
174 default = ["sqlite3", "notmuch", "regexp", "smtp", "dbus-notifications", "gpgme", "cli-docs", "jmap", "text-processing"]
175- notmuch = ["melib/notmuch", ]
176- jmap = ["melib/jmap",]
177+ notmuch = ["melib/notmuch"]
178+ jmap = ["melib/jmap"]
179 sqlite3 = ["melib/sqlite3"]
180 smtp = ["melib/smtp"]
181 smtp-trace = ["smtp", "melib/smtp-trace"]
182 regexp = ["pcre2"]
183- dbus-notifications = ["notify-rust",]
184+ dbus-notifications = ["notify-rust"]
185 cli-docs = ["flate2"]
186 svgscreenshot = ["svg_crate"]
187 text-processing = ["melib/unicode-algorithms"]
188 gpgme = ["melib/gpgme"]
189+ # Static / vendoring features.
190+ tls-static = ["melib/tls-static"]
191+ http-static = ["melib/http-static"]
192+ sqlite3-static = ["melib/sqlite3-static"]
193+ static = ["tls-static", "http-static", "sqlite3-static"]
194
195 # Print tracing logs as meli runs in stderr
196- # enable for debug tracing logs: build with --features=debug-tracing
197- debug-tracing = ["melib/debug-tracing", ]
198+ # enable for debug tracing logs: build with --features=debug-tracing and export MELI_DEBUG_STDERR
199+ debug-tracing = ["melib/debug-tracing"]
200 diff --git a/melib/Cargo.toml b/melib/Cargo.toml
201index b9ba662..c21ee15 100644
202--- a/melib/Cargo.toml
203+++ b/melib/Cargo.toml
204 @@ -30,9 +30,9 @@ futures = "0.3.5"
205
206 imap-codec = { version = "1.0.0", features = ["ext_condstore_qresync"], optional = true }
207
208- indexmap = { version = "^1.5", default-features = false, features = ["serde-1", ] }
209+ indexmap = { version = "^1.5", default-features = false, features = ["serde-1"] }
210 isahc = { version = "^1.7.2", optional = true, default-features = false, features = ["http2", "json", "text-decoding"] }
211- libc = { version = "0.2.125", features = ["extra_traits",] }
212+ libc = { version = "0.2.125", features = ["extra_traits"] }
213
214 libloading = "^0.7"
215 log = { version = "0.4", features = ["std"] }
216 @@ -43,11 +43,11 @@ notify = { version = "4.0.15", optional = true }
217 polling = "2.8"
218 regex = { version = "1" }
219 rusqlite = { version = "^0.29", default-features = false, optional = true }
220- serde = { version = "1.0", features = ["rc", ] }
221+ serde = { version = "1.0", features = ["rc"] }
222 serde_derive = "1.0"
223- serde_json = { version = "1.0", features = ["raw_value",] }
224+ serde_json = { version = "1.0", features = ["raw_value"] }
225 serde_path_to_error = { version = "0.1" }
226- smallvec = { version = "^1.5.0", features = ["serde", ] }
227+ smallvec = { version = "^1.5.0", features = ["serde"] }
228 smol = "1.0.0"
229 socket2 = { version = "0.4", features = [] }
230
231 @@ -80,8 +80,10 @@ mbox = ["notify"]
232 notmuch = []
233 smtp = ["tls", "base64"]
234 smtp-trace = ["smtp"]
235- sqlite3 = ["rusqlite", ]
236+ sqlite3 = ["rusqlite"]
237+ sqlite3-static = ["sqlite3", "rusqlite/bundled-full"]
238 tls = ["native-tls"]
239+ tls-static = ["tls", "native-tls/vendored"]
240 text-processing = []
241 unicode-algorithms = ["text-processing", "unicode-segmentation"]
242 unicode-algorithms-cached = ["text-processing", "unicode-segmentation"]