tangled
alpha
login
or
join now
teal.fm
/
teal
110
fork
atom
Your music, beautifully tracked. All yours. (coming soon)
teal.fm
teal-fm
atproto
110
fork
atom
overview
issues
pulls
pipelines
will cargo cross work
Natalie B.
7 months ago
df3f4881
4b4285fb
+375
-172
9 changed files
expand all
collapse all
unified
split
.github
SQLX_AND_CROSS_COMPILATION.md
workflows
ci.yml
Cargo.lock
Cargo.toml
Cross.toml
apps
aqua
Cross.toml
services
Cargo.lock
Cargo.toml
Cross.toml
+181
.github/SQLX_AND_CROSS_COMPILATION.md
···
1
1
+
# SQLx Offline and Cross-Compilation Setup
2
2
+
3
3
+
This document explains the configuration changes made to support SQLx offline builds and fix cross-compilation issues.
4
4
+
5
5
+
## Problems Solved
6
6
+
7
7
+
### 1. SQLx Offline Compilation
8
8
+
When `SQLX_OFFLINE=true`, each Rust project needs access to `.sqlx` query metadata files in their local directory. Previously, these files only existed at the workspace root, causing builds to fail outside Docker.
9
9
+
10
10
+
### 2. Cross-Compilation OpenSSL Issues
11
11
+
Cross-compilation was failing due to OpenSSL dependencies being pulled in by various crates, which is notoriously difficult to cross-compile.
12
12
+
13
13
+
## Solutions Implemented
14
14
+
15
15
+
### SQLx Offline Setup
16
16
+
17
17
+
#### Script: `scripts/setup-sqlx-offline.sh`
18
18
+
- Automatically copies `.sqlx` files from workspace root to each SQLx-dependent project
19
19
+
- Identifies projects that use SQLx by checking `Cargo.toml` files
20
20
+
- Projects that receive `.sqlx` files:
21
21
+
- `apps/aqua`
22
22
+
- `services/cadet`
23
23
+
- `services/satellite`
24
24
+
25
25
+
#### CI Integration
26
26
+
The script is now called in all CI jobs that build Rust code:
27
27
+
- `setup-and-build` job
28
28
+
- `rust-cross-compile` job
29
29
+
- `rust-quality` job
30
30
+
- `security-audit` job
31
31
+
32
32
+
### Cross-Compilation Fixes
33
33
+
34
34
+
#### 1. Replaced OpenSSL with rustls
35
35
+
Updated workspace dependencies to use rustls instead of OpenSSL:
36
36
+
37
37
+
```toml
38
38
+
# Root Cargo.toml
39
39
+
sqlx = { version = "0.8", features = [
40
40
+
"runtime-tokio",
41
41
+
"postgres",
42
42
+
"uuid",
43
43
+
"tls-rustls", # Instead of default OpenSSL
44
44
+
] }
45
45
+
46
46
+
reqwest = { version = "0.12", default-features = false, features = [
47
47
+
"json",
48
48
+
"rustls-tls", # Instead of default native-tls
49
49
+
"stream",
50
50
+
"gzip",
51
51
+
] }
52
52
+
53
53
+
tokio-tungstenite = { version = "*", default-features = false, features = [
54
54
+
"rustls-tls-webpki-roots", # Instead of default native-tls
55
55
+
] }
56
56
+
```
57
57
+
58
58
+
#### 2. Fixed Workspace Dependency Conflicts
59
59
+
The `services/Cargo.toml` was overriding workspace dependencies with different configurations. Fixed by:
60
60
+
- Changing `reqwest = { version = "0.12", features = ["json"] }` to `reqwest.workspace = true`
61
61
+
- Changing `tokio-tungstenite = "0.24"` to `tokio-tungstenite.workspace = true`
62
62
+
63
63
+
#### 3. Enhanced Cross.toml Configuration
64
64
+
Created comprehensive `Cross.toml` files for cross-compilation:
65
65
+
66
66
+
```toml
67
67
+
[build.env]
68
68
+
passthrough = [
69
69
+
"CARGO_HOME",
70
70
+
"CARGO_TARGET_DIR",
71
71
+
"SQLX_OFFLINE",
72
72
+
"PKG_CONFIG_ALLOW_CROSS",
73
73
+
]
74
74
+
75
75
+
[target.aarch64-unknown-linux-gnu]
76
76
+
image = "ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main"
77
77
+
78
78
+
[target.aarch64-unknown-linux-gnu.env]
79
79
+
passthrough = ["CARGO_HOME", "CARGO_TARGET_DIR", "SQLX_OFFLINE"]
80
80
+
PKG_CONFIG_ALLOW_CROSS = "1"
81
81
+
RUSTFLAGS = "-C target-feature=+crt-static -C link-arg=-s"
82
82
+
CC_aarch64_unknown_linux_gnu = "aarch64-linux-gnu-gcc"
83
83
+
CXX_aarch64_unknown_linux_gnu = "aarch64-linux-gnu-g++"
84
84
+
```
85
85
+
86
86
+
#### 4. Improved CI Cross-Compilation
87
87
+
- Uses latest `cross` from Git: `cargo install cross --git https://github.com/cross-rs/cross`
88
88
+
- Sets `PKG_CONFIG_ALLOW_CROSS=1` environment variable
89
89
+
- Copies `.sqlx` files to individual service directories during cross-compilation
90
90
+
- Improved executable collection with better filtering
91
91
+
92
92
+
### Executable Collection
93
93
+
94
94
+
Enhanced executable collection in CI:
95
95
+
- Filters out build artifacts (`.d` files and temporary files with `-` in names)
96
96
+
- Handles missing target directories gracefully
97
97
+
- Collects executables for both x86_64 and aarch64 targets
98
98
+
- Provides clear logging of collected executables
99
99
+
100
100
+
## File Changes
101
101
+
102
102
+
### Created
103
103
+
- `scripts/setup-sqlx-offline.sh` - SQLx offline setup script
104
104
+
- `Cross.toml` - Root cross-compilation config
105
105
+
- `services/Cross.toml` - Services cross-compilation config
106
106
+
- `apps/aqua/Cross.toml` - Aqua cross-compilation config
107
107
+
108
108
+
### Modified
109
109
+
- `Cargo.toml` - Updated workspace dependencies to use rustls
110
110
+
- `services/Cargo.toml` - Fixed workspace dependency usage
111
111
+
- `.github/workflows/ci.yml` - Added SQLx setup and improved cross-compilation
112
112
+
113
113
+
## Usage
114
114
+
115
115
+
### Running SQLx Setup Locally
116
116
+
```bash
117
117
+
./scripts/setup-sqlx-offline.sh
118
118
+
```
119
119
+
120
120
+
### Cross-Compilation Locally
121
121
+
```bash
122
122
+
# Install cross if not already installed
123
123
+
cargo install cross --git https://github.com/cross-rs/cross
124
124
+
125
125
+
# Add target
126
126
+
rustup target add aarch64-unknown-linux-gnu
127
127
+
128
128
+
# Set environment
129
129
+
export PKG_CONFIG_ALLOW_CROSS=1
130
130
+
export SQLX_OFFLINE=true
131
131
+
132
132
+
# Run SQLx setup
133
133
+
./scripts/setup-sqlx-offline.sh
134
134
+
135
135
+
# Cross-compile services
136
136
+
cd services
137
137
+
cross build --release --target aarch64-unknown-linux-gnu
138
138
+
139
139
+
# Cross-compile apps
140
140
+
cd ../apps/aqua
141
141
+
cross build --release --target aarch64-unknown-linux-gnu
142
142
+
```
143
143
+
144
144
+
### Updating SQLx Queries
145
145
+
When you add or modify SQL queries:
146
146
+
147
147
+
1. Generate new query metadata from the services directory:
148
148
+
```bash
149
149
+
cd services
150
150
+
cargo sqlx prepare
151
151
+
```
152
152
+
153
153
+
2. Update all project copies:
154
154
+
```bash
155
155
+
./scripts/setup-sqlx-offline.sh
156
156
+
```
157
157
+
158
158
+
## Troubleshooting
159
159
+
160
160
+
### Cross-Compilation Still Fails
161
161
+
- Ensure you're using the latest `cross` from Git
162
162
+
- Check that `PKG_CONFIG_ALLOW_CROSS=1` is set
163
163
+
- Verify no dependencies are pulling in OpenSSL (use `cargo tree | grep openssl`)
164
164
+
165
165
+
### SQLx Offline Errors
166
166
+
- Run `./scripts/setup-sqlx-offline.sh` after any SQL query changes
167
167
+
- Ensure `.sqlx` directory exists in workspace root
168
168
+
- Check that `SQLX_OFFLINE=true` is set in CI environment
169
169
+
170
170
+
### Missing Executables
171
171
+
- Check that build succeeded without errors
172
172
+
- Verify executable names match expected service/app names
173
173
+
- Look for executables in `artifacts/` directory structure
174
174
+
175
175
+
## Dependencies Avoided
176
176
+
To maintain cross-compilation compatibility, avoid dependencies that:
177
177
+
- Default to OpenSSL (use rustls variants)
178
178
+
- Require system libraries not available in cross containers
179
179
+
- Have complex native build requirements
180
180
+
181
181
+
Always test cross-compilation locally before pushing changes.
+42
-6
.github/workflows/ci.yml
···
37
37
- name: Build Node packages
38
38
run: pnpm build
39
39
40
40
-
- name: Build Rust (x86_64)
40
40
+
- name: Build Rust services (x86_64)
41
41
run: |
42
42
cargo build --release --all-features
43
43
44
44
+
- name: Build Rust apps (x86_64)
45
45
+
run: |
46
46
+
cd apps/aqua
47
47
+
cargo build --release --all-features
48
48
+
49
49
+
- name: Collect executables (x86_64)
50
50
+
run: |
51
51
+
mkdir -p artifacts/x86_64
52
52
+
# Copy service executables
53
53
+
if [ -d "services/target/release" ]; then
54
54
+
find services/target/release -maxdepth 1 -type f -executable ! -name "*.d" ! -name "*-*" -exec cp {} artifacts/x86_64/ \;
55
55
+
fi
56
56
+
# Copy app executables
57
57
+
if [ -d "apps/aqua/target/release" ]; then
58
58
+
find apps/aqua/target/release -maxdepth 1 -type f -executable ! -name "*.d" ! -name "*-*" -exec cp {} artifacts/x86_64/ \;
59
59
+
fi
60
60
+
echo "x86_64 executables:"
61
61
+
ls -la artifacts/x86_64/ || echo "No executables found"
62
62
+
44
63
- name: Upload Node build artifacts
45
64
uses: actions/upload-artifact@v4
46
65
with:
···
55
74
with:
56
75
name: rust-builds-x86_64
57
76
path: |
58
58
-
target/release/
77
77
+
artifacts/x86_64/
59
78
retention-days: 1
60
79
61
80
rust-cross-compile:
···
82
101
83
102
- name: Install cross-compilation tools
84
103
run: |
85
85
-
cargo install cross
104
104
+
cargo install cross --git https://github.com/cross-rs/cross
86
105
rustup target add ${{ matrix.target }}
106
106
+
# Set up environment for cross-compilation
107
107
+
echo "PKG_CONFIG_ALLOW_CROSS=1" >> $GITHUB_ENV
87
108
88
88
-
- name: Cross-compile rust
89
89
-
run: cross build --release --all-features --target ${{ matrix.target }}
109
109
+
- name: Cross-compile services
110
110
+
run: |
111
111
+
cross build --release --all-features --target ${{ matrix.target }}
112
112
+
113
113
+
- name: Collect cross-compiled executables
114
114
+
run: |
115
115
+
mkdir -p artifacts/${{ matrix.target }}
116
116
+
# Copy service executables
117
117
+
if [ -d "services/target/${{ matrix.target }}/release" ]; then
118
118
+
find services/target/${{ matrix.target }}/release -maxdepth 1 -type f -executable ! -name "*.d" ! -name "*-*" -exec cp {} artifacts/${{ matrix.target }}/ \;
119
119
+
fi
120
120
+
# Copy app executables
121
121
+
if [ -d "apps/aqua/target/${{ matrix.target }}/release" ]; then
122
122
+
find apps/aqua/target/${{ matrix.target }}/release -maxdepth 1 -type f -executable ! -name "*.d" ! -name "*-*" -exec cp {} artifacts/${{ matrix.target }}/ \;
123
123
+
fi
124
124
+
echo "Cross-compiled executables for ${{ matrix.target }}:"
125
125
+
ls -la artifacts/${{ matrix.target }}/ || echo "No executables found"
90
126
91
127
- name: Upload cross-compiled artifacts
92
128
uses: actions/upload-artifact@v4
93
129
with:
94
130
name: rust-builds-${{ matrix.target }}
95
131
path: |
96
96
-
target/${{ matrix.target }}/release/
132
132
+
artifacts/${{ matrix.target }}/
97
133
retention-days: 1
98
134
99
135
rust-quality:
+53
-161
Cargo.lock
···
166
166
checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50"
167
167
168
168
[[package]]
169
169
+
name = "async-compression"
170
170
+
version = "0.4.27"
171
171
+
source = "registry+https://github.com/rust-lang/crates.io-index"
172
172
+
checksum = "ddb939d66e4ae03cee6091612804ba446b12878410cfa17f785f4dd67d4014e8"
173
173
+
dependencies = [
174
174
+
"flate2",
175
175
+
"futures-core",
176
176
+
"memchr",
177
177
+
"pin-project-lite",
178
178
+
"tokio",
179
179
+
]
180
180
+
181
181
+
[[package]]
169
182
name = "async-lock"
170
183
version = "3.4.0"
171
184
source = "registry+https://github.com/rust-lang/crates.io-index"
···
813
826
814
827
[[package]]
815
828
name = "core-foundation"
816
816
-
version = "0.9.4"
817
817
-
source = "registry+https://github.com/rust-lang/crates.io-index"
818
818
-
checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f"
819
819
-
dependencies = [
820
820
-
"core-foundation-sys",
821
821
-
"libc",
822
822
-
]
823
823
-
824
824
-
[[package]]
825
825
-
name = "core-foundation"
826
829
version = "0.10.1"
827
830
source = "registry+https://github.com/rust-lang/crates.io-index"
828
831
checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6"
···
869
872
version = "2.4.0"
870
873
source = "registry+https://github.com/rust-lang/crates.io-index"
871
874
checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5"
875
875
+
876
876
+
[[package]]
877
877
+
name = "crc32fast"
878
878
+
version = "1.5.0"
879
879
+
source = "registry+https://github.com/rust-lang/crates.io-index"
880
880
+
checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511"
881
881
+
dependencies = [
882
882
+
"cfg-if",
883
883
+
]
872
884
873
885
[[package]]
874
886
name = "crossbeam-channel"
···
1258
1270
]
1259
1271
1260
1272
[[package]]
1273
1273
+
name = "flate2"
1274
1274
+
version = "1.1.2"
1275
1275
+
source = "registry+https://github.com/rust-lang/crates.io-index"
1276
1276
+
checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d"
1277
1277
+
dependencies = [
1278
1278
+
"crc32fast",
1279
1279
+
"miniz_oxide",
1280
1280
+
]
1281
1281
+
1282
1282
+
[[package]]
1261
1283
name = "flume"
1262
1284
version = "0.11.1"
1263
1285
source = "registry+https://github.com/rust-lang/crates.io-index"
···
1282
1304
checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2"
1283
1305
1284
1306
[[package]]
1285
1285
-
name = "foreign-types"
1286
1286
-
version = "0.3.2"
1287
1287
-
source = "registry+https://github.com/rust-lang/crates.io-index"
1288
1288
-
checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
1289
1289
-
dependencies = [
1290
1290
-
"foreign-types-shared",
1291
1291
-
]
1292
1292
-
1293
1293
-
[[package]]
1294
1294
-
name = "foreign-types-shared"
1295
1295
-
version = "0.1.1"
1296
1296
-
source = "registry+https://github.com/rust-lang/crates.io-index"
1297
1297
-
checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
1298
1298
-
1299
1299
-
[[package]]
1300
1307
name = "form_urlencoded"
1301
1308
version = "1.2.1"
1302
1309
source = "registry+https://github.com/rust-lang/crates.io-index"
···
1656
1663
]
1657
1664
1658
1665
[[package]]
1659
1659
-
name = "hyper-tls"
1660
1660
-
version = "0.6.0"
1661
1661
-
source = "registry+https://github.com/rust-lang/crates.io-index"
1662
1662
-
checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0"
1663
1663
-
dependencies = [
1664
1664
-
"bytes",
1665
1665
-
"http-body-util",
1666
1666
-
"hyper",
1667
1667
-
"hyper-util",
1668
1668
-
"native-tls",
1669
1669
-
"tokio",
1670
1670
-
"tokio-native-tls",
1671
1671
-
"tower-service",
1672
1672
-
]
1673
1673
-
1674
1674
-
[[package]]
1675
1666
name = "hyper-util"
1676
1667
version = "0.1.16"
1677
1668
source = "registry+https://github.com/rust-lang/crates.io-index"
···
1690
1681
"percent-encoding",
1691
1682
"pin-project-lite",
1692
1683
"socket2 0.6.0",
1693
1693
-
"system-configuration",
1694
1684
"tokio",
1695
1685
"tower-service",
1696
1686
"tracing",
1697
1697
-
"windows-registry",
1698
1687
]
1699
1688
1700
1689
[[package]]
···
2445
2434
]
2446
2435
2447
2436
[[package]]
2448
2448
-
name = "native-tls"
2449
2449
-
version = "0.2.14"
2450
2450
-
source = "registry+https://github.com/rust-lang/crates.io-index"
2451
2451
-
checksum = "87de3442987e9dbec73158d5c715e7ad9072fda936bb03d19d7fa10e00520f0e"
2452
2452
-
dependencies = [
2453
2453
-
"libc",
2454
2454
-
"log",
2455
2455
-
"openssl",
2456
2456
-
"openssl-probe",
2457
2457
-
"openssl-sys",
2458
2458
-
"schannel",
2459
2459
-
"security-framework 2.11.1",
2460
2460
-
"security-framework-sys",
2461
2461
-
"tempfile",
2462
2462
-
]
2463
2463
-
2464
2464
-
[[package]]
2465
2437
name = "nom"
2466
2438
version = "7.1.3"
2467
2439
source = "registry+https://github.com/rust-lang/crates.io-index"
···
2593
2565
checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad"
2594
2566
2595
2567
[[package]]
2596
2596
-
name = "openssl"
2597
2597
-
version = "0.10.73"
2598
2598
-
source = "registry+https://github.com/rust-lang/crates.io-index"
2599
2599
-
checksum = "8505734d46c8ab1e19a1dce3aef597ad87dcb4c37e7188231769bd6bd51cebf8"
2600
2600
-
dependencies = [
2601
2601
-
"bitflags 2.9.1",
2602
2602
-
"cfg-if",
2603
2603
-
"foreign-types",
2604
2604
-
"libc",
2605
2605
-
"once_cell",
2606
2606
-
"openssl-macros",
2607
2607
-
"openssl-sys",
2608
2608
-
]
2609
2609
-
2610
2610
-
[[package]]
2611
2611
-
name = "openssl-macros"
2612
2612
-
version = "0.1.1"
2613
2613
-
source = "registry+https://github.com/rust-lang/crates.io-index"
2614
2614
-
checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c"
2615
2615
-
dependencies = [
2616
2616
-
"proc-macro2",
2617
2617
-
"quote",
2618
2618
-
"syn 2.0.104",
2619
2619
-
]
2620
2620
-
2621
2621
-
[[package]]
2622
2568
name = "openssl-probe"
2623
2569
version = "0.1.6"
2624
2570
source = "registry+https://github.com/rust-lang/crates.io-index"
2625
2571
checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e"
2626
2626
-
2627
2627
-
[[package]]
2628
2628
-
name = "openssl-sys"
2629
2629
-
version = "0.9.109"
2630
2630
-
source = "registry+https://github.com/rust-lang/crates.io-index"
2631
2631
-
checksum = "90096e2e47630d78b7d1c20952dc621f957103f8bc2c8359ec81290d75238571"
2632
2632
-
dependencies = [
2633
2633
-
"cc",
2634
2634
-
"libc",
2635
2635
-
"pkg-config",
2636
2636
-
"vcpkg",
2637
2637
-
]
2638
2572
2639
2573
[[package]]
2640
2574
name = "option-ext"
···
3089
3023
source = "registry+https://github.com/rust-lang/crates.io-index"
3090
3024
checksum = "cbc931937e6ca3a06e3b6c0aa7841849b160a90351d6ab467a8b9b9959767531"
3091
3025
dependencies = [
3026
3026
+
"async-compression",
3092
3027
"base64",
3093
3028
"bytes",
3094
3094
-
"encoding_rs",
3095
3029
"futures-core",
3096
3096
-
"h2",
3030
3030
+
"futures-util",
3097
3031
"http",
3098
3032
"http-body",
3099
3033
"http-body-util",
3100
3034
"hyper",
3101
3035
"hyper-rustls",
3102
3102
-
"hyper-tls",
3103
3036
"hyper-util",
3104
3037
"js-sys",
3105
3038
"log",
3106
3106
-
"mime",
3107
3107
-
"native-tls",
3108
3039
"percent-encoding",
3109
3040
"pin-project-lite",
3110
3041
"quinn",
···
3115
3046
"serde_urlencoded",
3116
3047
"sync_wrapper",
3117
3048
"tokio",
3118
3118
-
"tokio-native-tls",
3119
3049
"tokio-rustls",
3050
3050
+
"tokio-util",
3120
3051
"tower",
3121
3052
"tower-http",
3122
3053
"tower-service",
3123
3054
"url",
3124
3055
"wasm-bindgen",
3125
3056
"wasm-bindgen-futures",
3057
3057
+
"wasm-streams",
3126
3058
"web-sys",
3127
3059
"webpki-roots 1.0.2",
3128
3060
]
···
3279
3211
"openssl-probe",
3280
3212
"rustls-pki-types",
3281
3213
"schannel",
3282
3282
-
"security-framework 3.2.0",
3214
3214
+
"security-framework",
3283
3215
]
3284
3216
3285
3217
[[package]]
···
3353
3285
3354
3286
[[package]]
3355
3287
name = "security-framework"
3356
3356
-
version = "2.11.1"
3357
3357
-
source = "registry+https://github.com/rust-lang/crates.io-index"
3358
3358
-
checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02"
3359
3359
-
dependencies = [
3360
3360
-
"bitflags 2.9.1",
3361
3361
-
"core-foundation 0.9.4",
3362
3362
-
"core-foundation-sys",
3363
3363
-
"libc",
3364
3364
-
"security-framework-sys",
3365
3365
-
]
3366
3366
-
3367
3367
-
[[package]]
3368
3368
-
name = "security-framework"
3369
3288
version = "3.2.0"
3370
3289
source = "registry+https://github.com/rust-lang/crates.io-index"
3371
3290
checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316"
3372
3291
dependencies = [
3373
3292
"bitflags 2.9.1",
3374
3374
-
"core-foundation 0.10.1",
3293
3293
+
"core-foundation",
3375
3294
"core-foundation-sys",
3376
3295
"libc",
3377
3296
"security-framework-sys",
···
3663
3582
"memchr",
3664
3583
"once_cell",
3665
3584
"percent-encoding",
3585
3585
+
"rustls",
3666
3586
"serde",
3667
3587
"serde_json",
3668
3588
"sha2",
···
3674
3594
"tracing",
3675
3595
"url",
3676
3596
"uuid",
3597
3597
+
"webpki-roots 0.26.11",
3677
3598
]
3678
3599
3679
3600
[[package]]
···
3943
3864
]
3944
3865
3945
3866
[[package]]
3946
3946
-
name = "system-configuration"
3947
3947
-
version = "0.6.1"
3948
3948
-
source = "registry+https://github.com/rust-lang/crates.io-index"
3949
3949
-
checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b"
3950
3950
-
dependencies = [
3951
3951
-
"bitflags 2.9.1",
3952
3952
-
"core-foundation 0.9.4",
3953
3953
-
"system-configuration-sys",
3954
3954
-
]
3955
3955
-
3956
3956
-
[[package]]
3957
3957
-
name = "system-configuration-sys"
3958
3958
-
version = "0.6.0"
3959
3959
-
source = "registry+https://github.com/rust-lang/crates.io-index"
3960
3960
-
checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4"
3961
3961
-
dependencies = [
3962
3962
-
"core-foundation-sys",
3963
3963
-
"libc",
3964
3964
-
]
3965
3965
-
3966
3966
-
[[package]]
3967
3867
name = "tagptr"
3968
3868
version = "0.2.0"
3969
3869
source = "registry+https://github.com/rust-lang/crates.io-index"
···
4137
4037
"proc-macro2",
4138
4038
"quote",
4139
4039
"syn 2.0.104",
4140
4140
-
]
4141
4141
-
4142
4142
-
[[package]]
4143
4143
-
name = "tokio-native-tls"
4144
4144
-
version = "0.3.1"
4145
4145
-
source = "registry+https://github.com/rust-lang/crates.io-index"
4146
4146
-
checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2"
4147
4147
-
dependencies = [
4148
4148
-
"native-tls",
4149
4149
-
"tokio",
4150
4040
]
4151
4041
4152
4042
[[package]]
···
4648
4538
]
4649
4539
4650
4540
[[package]]
4541
4541
+
name = "wasm-streams"
4542
4542
+
version = "0.4.2"
4543
4543
+
source = "registry+https://github.com/rust-lang/crates.io-index"
4544
4544
+
checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65"
4545
4545
+
dependencies = [
4546
4546
+
"futures-util",
4547
4547
+
"js-sys",
4548
4548
+
"wasm-bindgen",
4549
4549
+
"wasm-bindgen-futures",
4550
4550
+
"web-sys",
4551
4551
+
]
4552
4552
+
4553
4553
+
[[package]]
4651
4554
name = "web-sys"
4652
4555
version = "0.3.77"
4653
4556
source = "registry+https://github.com/rust-lang/crates.io-index"
···
4855
4758
dependencies = [
4856
4759
"windows-core 0.61.2",
4857
4760
"windows-link",
4858
4858
-
]
4859
4859
-
4860
4860
-
[[package]]
4861
4861
-
name = "windows-registry"
4862
4862
-
version = "0.5.3"
4863
4863
-
source = "registry+https://github.com/rust-lang/crates.io-index"
4864
4864
-
checksum = "5b8a9ed28765efc97bbc954883f4e6796c33a06546ebafacbabee9696967499e"
4865
4865
-
dependencies = [
4866
4866
-
"windows-link",
4867
4867
-
"windows-result 0.3.4",
4868
4868
-
"windows-strings",
4869
4761
]
4870
4762
4871
4763
[[package]]
+15
-3
Cargo.toml
···
12
12
tokio = { version = "1.0", features = ["rt-multi-thread", "macros"] }
13
13
axum = { version = "0.8", features = ["macros"] }
14
14
tower-http = { version = "0.6", features = ["cors"] }
15
15
-
sqlx = { version = "0.8", features = ["runtime-tokio", "postgres", "uuid"] }
15
15
+
sqlx = { version = "0.8", features = [
16
16
+
"runtime-tokio",
17
17
+
"postgres",
18
18
+
"uuid",
19
19
+
"tls-rustls",
20
20
+
] }
16
21
serde = { version = "1.0", features = ["derive"] }
17
22
anyhow = "1.0"
18
23
serde_json = "1.0"
19
24
tracing = "0.1"
20
25
tracing-subscriber = "0.3"
21
26
metrics = "0.23"
22
22
-
reqwest = { version = "0.12", features = ["json", "rustls-tls"] }
27
27
+
reqwest = { version = "0.12", default-features = false, features = [
28
28
+
"json",
29
29
+
"rustls-tls",
30
30
+
"stream",
31
31
+
"gzip",
32
32
+
] }
23
33
url = "2.5"
24
34
rand = "0.8"
25
35
flume = "0.11"
26
36
async-trait = "0.1"
27
37
time = "0.3"
28
38
dotenvy = "0.15"
29
29
-
tokio-tungstenite = { version = "*", features = ["rustls-tls-webpki-roots"] }
39
39
+
tokio-tungstenite = { version = "*", default-features = false, features = [
40
40
+
"rustls-tls-webpki-roots",
41
41
+
] }
30
42
atrium-api = "0.25"
31
43
chrono = "0.4"
32
44
uuid = { version = "1.0", features = ["v4", "serde"] }
+20
Cross.toml
···
1
1
+
[build.env]
2
2
+
passthrough = [
3
3
+
"CARGO_HOME",
4
4
+
"CARGO_TARGET_DIR",
5
5
+
"SQLX_OFFLINE",
6
6
+
"PKG_CONFIG_ALLOW_CROSS",
7
7
+
]
8
8
+
9
9
+
[target.aarch64-unknown-linux-gnu]
10
10
+
image = "ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main"
11
11
+
12
12
+
[target.aarch64-unknown-linux-gnu.env]
13
13
+
passthrough = ["CARGO_HOME", "CARGO_TARGET_DIR", "SQLX_OFFLINE"]
14
14
+
# Allow cross-compilation of native dependencies
15
15
+
PKG_CONFIG_ALLOW_CROSS = "1"
16
16
+
# Use static linking to reduce runtime dependencies
17
17
+
RUSTFLAGS = "-C target-feature=+crt-static -C link-arg=-s"
18
18
+
# Disable problematic features that might require OpenSSL
19
19
+
CC_aarch64_unknown_linux_gnu = "aarch64-linux-gnu-gcc"
20
20
+
CXX_aarch64_unknown_linux_gnu = "aarch64-linux-gnu-g++"
+20
apps/aqua/Cross.toml
···
1
1
+
[build.env]
2
2
+
passthrough = [
3
3
+
"CARGO_HOME",
4
4
+
"CARGO_TARGET_DIR",
5
5
+
"SQLX_OFFLINE",
6
6
+
"PKG_CONFIG_ALLOW_CROSS",
7
7
+
]
8
8
+
9
9
+
[target.aarch64-unknown-linux-gnu]
10
10
+
image = "ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main"
11
11
+
12
12
+
[target.aarch64-unknown-linux-gnu.env]
13
13
+
passthrough = ["CARGO_HOME", "CARGO_TARGET_DIR", "SQLX_OFFLINE"]
14
14
+
# Allow cross-compilation of native dependencies
15
15
+
PKG_CONFIG_ALLOW_CROSS = "1"
16
16
+
# Use static linking to reduce runtime dependencies
17
17
+
RUSTFLAGS = "-C target-feature=+crt-static -C link-arg=-s"
18
18
+
# Disable problematic features that might require OpenSSL
19
19
+
CC_aarch64_unknown_linux_gnu = "aarch64-linux-gnu-gcc"
20
20
+
CXX_aarch64_unknown_linux_gnu = "aarch64-linux-gnu-g++"
+21
services/Cargo.lock
···
2836
2836
dependencies = [
2837
2837
"aws-lc-rs",
2838
2838
"once_cell",
2839
2839
+
"ring",
2839
2840
"rustls-pki-types",
2840
2841
"rustls-webpki",
2841
2842
"subtle",
···
3236
3237
"memchr",
3237
3238
"once_cell",
3238
3239
"percent-encoding",
3240
3240
+
"rustls",
3239
3241
"serde",
3240
3242
"serde_json",
3241
3243
"sha2",
···
3247
3249
"tracing",
3248
3250
"url",
3249
3251
"uuid",
3252
3252
+
"webpki-roots 0.26.11",
3250
3253
]
3251
3254
3252
3255
[[package]]
···
4169
4172
dependencies = [
4170
4173
"js-sys",
4171
4174
"wasm-bindgen",
4175
4175
+
]
4176
4176
+
4177
4177
+
[[package]]
4178
4178
+
name = "webpki-roots"
4179
4179
+
version = "0.26.11"
4180
4180
+
source = "registry+https://github.com/rust-lang/crates.io-index"
4181
4181
+
checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9"
4182
4182
+
dependencies = [
4183
4183
+
"webpki-roots 1.0.2",
4184
4184
+
]
4185
4185
+
4186
4186
+
[[package]]
4187
4187
+
name = "webpki-roots"
4188
4188
+
version = "1.0.2"
4189
4189
+
source = "registry+https://github.com/rust-lang/crates.io-index"
4190
4190
+
checksum = "7e8983c3ab33d6fb807cfcdad2491c4ea8cbc8ed839181c7dfd9c67c83e261b2"
4191
4191
+
dependencies = [
4192
4192
+
"rustls-pki-types",
4172
4193
]
4173
4194
4174
4195
[[package]]
+3
-2
services/Cargo.toml
···
12
12
"postgres",
13
13
"uuid",
14
14
"chrono",
15
15
+
"tls-rustls",
15
16
] }
16
17
serde = { version = "1.0", features = ["derive"] }
17
18
anyhow = "1.0"
···
19
20
tracing = "0.1"
20
21
tracing-subscriber = "0.3"
21
22
metrics = "0.23"
22
22
-
reqwest = { version = "0.12", features = ["json"] }
23
23
+
reqwest.workspace = true
23
24
url = "2.5"
24
25
rand = "0.8"
25
26
flume = "0.11"
26
27
async-trait = "0.1"
27
28
time = "0.3"
28
29
dotenvy = "0.15"
29
29
-
tokio-tungstenite = "0.24"
30
30
+
tokio-tungstenite.workspace = true
30
31
atrium-api = "0.25"
31
32
chrono = { version = "0.4", features = ["serde"] }
32
33
uuid = { version = "1.0", features = ["v4", "serde"] }
+20
services/Cross.toml
···
1
1
+
[build.env]
2
2
+
passthrough = [
3
3
+
"CARGO_HOME",
4
4
+
"CARGO_TARGET_DIR",
5
5
+
"SQLX_OFFLINE",
6
6
+
"PKG_CONFIG_ALLOW_CROSS",
7
7
+
]
8
8
+
9
9
+
[target.aarch64-unknown-linux-gnu]
10
10
+
image = "ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main"
11
11
+
12
12
+
[target.aarch64-unknown-linux-gnu.env]
13
13
+
passthrough = ["CARGO_HOME", "CARGO_TARGET_DIR", "SQLX_OFFLINE"]
14
14
+
# Allow cross-compilation of native dependencies
15
15
+
PKG_CONFIG_ALLOW_CROSS = "1"
16
16
+
# Use static linking to reduce runtime dependencies
17
17
+
RUSTFLAGS = "-C target-feature=+crt-static -C link-arg=-s"
18
18
+
# Disable problematic features that might require OpenSSL
19
19
+
CC_aarch64_unknown_linux_gnu = "aarch64-linux-gnu-gcc"
20
20
+
CXX_aarch64_unknown_linux_gnu = "aarch64-linux-gnu-g++"