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