Your music, beautifully tracked. All yours. (coming soon) teal.fm
teal-fm atproto

add stuff we prob need

Changed files
+37 -1
.github
+28
.github/SQLX_AND_CROSS_COMPILATION.md
··· 36 37 ```toml 38 # Root Cargo.toml 39 sqlx = { version = "0.8", features = [ 40 "runtime-tokio", 41 "postgres", ··· 52 53 tokio-tungstenite = { version = "*", default-features = false, features = [ 54 "rustls-tls-webpki-roots", # Instead of default native-tls 55 ] } 56 ``` 57 ··· 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 ··· 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.
··· 36 37 ```toml 38 # Root Cargo.toml 39 + tokio = { version = "1.0", features = [ 40 + "rt-multi-thread", 41 + "macros", 42 + "time", # Required for tokio::time module 43 + "net", # Required for networking 44 + "sync", # Required for synchronization primitives 45 + ] } 46 + 47 sqlx = { version = "0.8", features = [ 48 "runtime-tokio", 49 "postgres", ··· 60 61 tokio-tungstenite = { version = "*", default-features = false, features = [ 62 "rustls-tls-webpki-roots", # Instead of default native-tls 63 + "connect", # For connect_async function 64 + "handshake", # For accept_async function (tests) 65 ] } 66 ``` 67 ··· 172 - Check that `PKG_CONFIG_ALLOW_CROSS=1` is set 173 - Verify no dependencies are pulling in OpenSSL (use `cargo tree | grep openssl`) 174 175 + ### tokio-tungstenite Import Errors 176 + If you see "unresolved import `tokio_tungstenite::connect_async`" errors: 177 + - Ensure the `connect` feature is enabled for client functionality 178 + - Add the `handshake` feature if using `accept_async` for server functionality 179 + - Check that `default-features = false` is set to avoid OpenSSL dependencies 180 + 181 + ### tokio Module Errors 182 + If you see "could not find `time` in `tokio`" or similar errors: 183 + - Ensure tokio workspace dependency includes required features: `time`, `net`, `sync` 184 + - These features are often included in default features but must be explicit when using `default-features = false` 185 + 186 ### SQLx Offline Errors 187 - Run `./scripts/setup-sqlx-offline.sh` after any SQL query changes 188 - Ensure `.sqlx` directory exists in workspace root ··· 198 - Default to OpenSSL (use rustls variants) 199 - Require system libraries not available in cross containers 200 - Have complex native build requirements 201 + 202 + ### Common Feature Configuration Issues 203 + When disabling default features to avoid OpenSSL: 204 + - `tokio`: Must explicitly enable `time`, `net`, `sync` features for common functionality 205 + - `tokio-tungstenite`: Must explicitly enable `connect` and `handshake` features 206 + - `reqwest`: Must explicitly enable required features like `json`, `stream`, `gzip` 207 + - `sqlx`: Use `tls-rustls` instead of default OpenSSL TLS 208 209 Always test cross-compilation locally before pushing changes.
+9 -1
Cargo.toml
··· 9 10 [workspace.dependencies] 11 # Shared dependencies 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 = [ ··· 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"
··· 9 10 [workspace.dependencies] 11 # Shared dependencies 12 + tokio = { version = "1.0", features = [ 13 + "rt-multi-thread", 14 + "macros", 15 + "time", 16 + "net", 17 + "sync", 18 + ] } 19 axum = { version = "0.8", features = ["macros"] } 20 tower-http = { version = "0.6", features = ["cors"] } 21 sqlx = { version = "0.8", features = [ ··· 44 dotenvy = "0.15" 45 tokio-tungstenite = { version = "*", default-features = false, features = [ 46 "rustls-tls-webpki-roots", 47 + "connect", 48 + "handshake", 49 ] } 50 atrium-api = "0.25" 51 chrono = "0.4"