warzone-wasm crate: - Compiles warzone-protocol to WebAssembly via wasm-pack - Exposes WasmIdentity, WasmSession, decrypt_wire_message to JS - Same X25519 + ChaCha20-Poly1305 + X3DH + Double Ratchet as CLI - 344KB WASM binary (optimized with wasm-opt) WireMessage moved to warzone-protocol: - Shared type used by CLI client, WASM bridge, and TUI - Guarantees identical bincode serialization across all clients Web client rewritten: - Loads WASM module on startup (/wasm/warzone_wasm.js) - Identity: WasmIdentity generates same key types as CLI - Registration: sends bincode PreKeyBundle (same format as CLI) - Encrypt: WasmSession.encrypt/encrypt_key_exchange - Decrypt: decrypt_wire_message (handles KeyExchange + Message) - Sessions persisted in localStorage (base64 ratchet state) - Groups: per-member WASM encryption (interop with CLI members) Server routes: - GET /wasm/warzone_wasm.js — serves WASM JS glue - GET /wasm/warzone_wasm_bg.wasm — serves WASM binary - Both embedded at compile time via include_str!/include_bytes! Web ↔ CLI interop now works: - Same key exchange (X3DH with X25519) - Same ratchet (Double Ratchet with ChaCha20-Poly1305) - Same wire format (bincode WireMessage) - Web user can message CLI user and vice versa Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
79 lines
1.4 KiB
TOML
79 lines
1.4 KiB
TOML
[workspace]
|
|
resolver = "2"
|
|
members = [
|
|
"crates/warzone-protocol",
|
|
"crates/warzone-server",
|
|
"crates/warzone-client",
|
|
"crates/warzone-mule",
|
|
"crates/warzone-wasm",
|
|
]
|
|
|
|
[workspace.package]
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
license = "MIT"
|
|
rust-version = "1.75"
|
|
|
|
[workspace.dependencies]
|
|
# Crypto
|
|
ed25519-dalek = { version = "2", features = ["serde", "rand_core"] }
|
|
x25519-dalek = { version = "2", features = ["serde", "static_secrets"] }
|
|
curve25519-dalek = "4"
|
|
chacha20poly1305 = "0.10"
|
|
hkdf = "0.12"
|
|
sha2 = "0.10"
|
|
argon2 = "0.5"
|
|
rand = "0.8"
|
|
|
|
# BIP39
|
|
bip39 = "2"
|
|
|
|
# Serialization
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
bincode = "1"
|
|
|
|
# Async
|
|
tokio = { version = "1", features = ["full"] }
|
|
|
|
# Server
|
|
axum = "0.7"
|
|
tower = "0.4"
|
|
tower-http = { version = "0.5", features = ["cors", "trace"] }
|
|
|
|
# Client HTTP
|
|
reqwest = { version = "0.12", features = ["json"] }
|
|
|
|
# Database
|
|
sled = "0.34"
|
|
|
|
# CLI
|
|
clap = { version = "4", features = ["derive"] }
|
|
|
|
# TUI
|
|
ratatui = "0.28"
|
|
crossterm = "0.28"
|
|
|
|
# Logging
|
|
tracing = "0.1"
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
|
|
|
# Error handling
|
|
thiserror = "2"
|
|
anyhow = "1"
|
|
|
|
# Time
|
|
chrono = { version = "0.4", features = ["serde"] }
|
|
|
|
# Hex encoding
|
|
hex = "0.4"
|
|
|
|
# Base64
|
|
base64 = "0.22"
|
|
|
|
# UUID
|
|
uuid = { version = "1", features = ["v4", "serde"] }
|
|
|
|
# Zero secrets in memory
|
|
zeroize = { version = "1", features = ["derive"] }
|