835a48fe9d
Build and Deploy / build-and-push (push) Failing after 58s
Adds a new `solitaire_web` crate that compiles the full `solitaire_engine` to `wasm32-unknown-unknown` and renders to a `<canvas id="bevy-canvas">` element in `play.html` — the same ECS code path as desktop and Android. Changes to enable the WASM target: - .cargo/config.toml: add wasm32-unknown-unknown rustflags for getrandom - Workspace Cargo.toml: add solitaire_web member - solitaire_data/Cargo.toml: gate tokio/reqwest/dirs/keyring to non-wasm - solitaire_data/src: add wasm32 branch to data_dir() (returns None); cfg-gate sync_client network types, auth_tokens, matomo_client - solitaire_engine/Cargo.toml: gate tokio/reqwest/kira/arboard/dirs/zip to non-wasm (mio/cpal/arboard don't compile for wasm32-unknown-unknown) - solitaire_engine/src/lib.rs: cfg-gate module declarations and re-exports for analytics, audio, sync, sync_setup, avatar, leaderboard plugins - solitaire_engine/src/core_game_plugin.rs: cfg-gate plugin registrations that require TokioRuntime (audio, sync, analytics, leaderboard, avatar) - solitaire_engine/src/resources.rs: cfg-gate TokioRuntimeResource - solitaire_engine/src/game_plugin.rs: cfg-gate std::fs::remove_file (x10) - solitaire_engine/src/theme/mod.rs: cfg-gate importer module (uses dirs+zip) - solitaire_engine/src/settings_plugin.rs: cfg-gate theme ZIP import UI - solitaire_engine/src/assets/sources.rs: cfg-gate FileAssetReader/user_theme_dir - solitaire_engine/src/auto_complete_plugin.rs: cfg-gate audio system - solitaire_engine/src/daily_challenge_plugin.rs: cfg-gate server fetch - solitaire_engine/src/hud_plugin.rs: cfg-gate AvatarResource import - solitaire_engine/src/profile_plugin.rs: cfg-gate AvatarResource import - solitaire_server/web/play.html: minimal HTML canvas shell - solitaire_web/: new crate (Cargo.toml + src/lib.rs) - build_wasm.sh: add Bevy WASM build step (cargo + wasm-bindgen + wasm-opt) All tests pass; clippy --workspace -- -D warnings clean; native build (solitaire_engine, solitaire_app) unaffected. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
52 lines
2.1 KiB
TOML
52 lines
2.1 KiB
TOML
[package]
|
|
name = "solitaire_data"
|
|
version.workspace = true
|
|
license.workspace = true
|
|
edition.workspace = true
|
|
|
|
[dependencies]
|
|
solitaire_core = { workspace = true }
|
|
solitaire_sync = { workspace = true }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
chrono = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
async-trait = { workspace = true }
|
|
uuid = { workspace = true }
|
|
klondike = { workspace = true }
|
|
|
|
# These deps are not available / not needed on wasm32:
|
|
# dirs — platform data directories (no filesystem on browser)
|
|
# reqwest — native HTTP client (sync/analytics gated out on wasm32)
|
|
# tokio — OS-threaded async runtime (mio doesn't compile on wasm32)
|
|
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
|
|
dirs = { workspace = true }
|
|
reqwest = { workspace = true }
|
|
tokio = { workspace = true }
|
|
|
|
# `keyring-core` is the typed Entry/Error API used by
|
|
# `auth_tokens`. The crate's own dependency tree pulls in
|
|
# `rpassword` which uses `libc::__errno_location` — a symbol the
|
|
# Android NDK doesn't expose (`__errno` lives at a different path
|
|
# on bionic). On Android `auth_tokens` falls back to a stub
|
|
# implementation that always returns `KeychainUnavailable`; the
|
|
# real backend lands when we wire Android Keystore via JNI.
|
|
[target.'cfg(all(not(target_os = "android"), not(target_arch = "wasm32")))'.dependencies]
|
|
keyring-core = { workspace = true }
|
|
|
|
[target.'cfg(target_os = "android")'.dependencies]
|
|
jni = { workspace = true }
|
|
# android_keystore.rs uses bevy::android::ANDROID_APP to obtain the
|
|
# process-wide JavaVM handle for JNI. Must be listed here so the
|
|
# symbol resolves when cross-compiling for Android targets.
|
|
bevy = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
solitaire_server = { path = "../solitaire_server" }
|
|
solitaire_sync = { workspace = true }
|
|
axum = { workspace = true }
|
|
sqlx = { workspace = true }
|
|
jsonwebtoken = { workspace = true }
|
|
uuid = { workspace = true }
|
|
chrono = { workspace = true }
|