···36363737```toml
3838# Root Cargo.toml
3939+tokio = { version = "1.0", features = [
4040+ "rt-multi-thread",
4141+ "macros",
4242+ "time", # Required for tokio::time module
4343+ "net", # Required for networking
4444+ "sync", # Required for synchronization primitives
4545+] }
4646+3947sqlx = { version = "0.8", features = [
4048 "runtime-tokio",
4149 "postgres",
···52605361tokio-tungstenite = { version = "*", default-features = false, features = [
5462 "rustls-tls-webpki-roots", # Instead of default native-tls
6363+ "connect", # For connect_async function
6464+ "handshake", # For accept_async function (tests)
5565] }
5666```
5767···162172- Check that `PKG_CONFIG_ALLOW_CROSS=1` is set
163173- Verify no dependencies are pulling in OpenSSL (use `cargo tree | grep openssl`)
164174175175+### tokio-tungstenite Import Errors
176176+If you see "unresolved import `tokio_tungstenite::connect_async`" errors:
177177+- Ensure the `connect` feature is enabled for client functionality
178178+- Add the `handshake` feature if using `accept_async` for server functionality
179179+- Check that `default-features = false` is set to avoid OpenSSL dependencies
180180+181181+### tokio Module Errors
182182+If you see "could not find `time` in `tokio`" or similar errors:
183183+- Ensure tokio workspace dependency includes required features: `time`, `net`, `sync`
184184+- These features are often included in default features but must be explicit when using `default-features = false`
185185+165186### SQLx Offline Errors
166187- Run `./scripts/setup-sqlx-offline.sh` after any SQL query changes
167188- Ensure `.sqlx` directory exists in workspace root
···177198- Default to OpenSSL (use rustls variants)
178199- Require system libraries not available in cross containers
179200- Have complex native build requirements
201201+202202+### Common Feature Configuration Issues
203203+When disabling default features to avoid OpenSSL:
204204+- `tokio`: Must explicitly enable `time`, `net`, `sync` features for common functionality
205205+- `tokio-tungstenite`: Must explicitly enable `connect` and `handshake` features
206206+- `reqwest`: Must explicitly enable required features like `json`, `stream`, `gzip`
207207+- `sqlx`: Use `tls-rustls` instead of default OpenSSL TLS
180208181209Always test cross-compilation locally before pushing changes.
+9-1
Cargo.toml
···991010[workspace.dependencies]
1111# Shared dependencies
1212-tokio = { version = "1.0", features = ["rt-multi-thread", "macros"] }
1212+tokio = { version = "1.0", features = [
1313+ "rt-multi-thread",
1414+ "macros",
1515+ "time",
1616+ "net",
1717+ "sync",
1818+] }
1319axum = { version = "0.8", features = ["macros"] }
1420tower-http = { version = "0.6", features = ["cors"] }
1521sqlx = { version = "0.8", features = [
···3844dotenvy = "0.15"
3945tokio-tungstenite = { version = "*", default-features = false, features = [
4046 "rustls-tls-webpki-roots",
4747+ "connect",
4848+ "handshake",
4149] }
4250atrium-api = "0.25"
4351chrono = "0.4"