mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-30 23:14:37 +00:00
* Enhance socket connection logging and URL handling - Added logging for the backend URL in the `runtime_socket_connect` function to improve traceability. - Updated the `SocketManager` to convert HTTP/HTTPS URLs to WebSocket URLs, enhancing connection handling. - Improved error logging to capture detailed error chains during connection failures, aiding in debugging. * Enhance TDLib integration and macOS bundling process - Updated build.rs to include a setup function for TDLib, ensuring the correct version is used based on the target OS. - Added a new script, build-tdlib-from-source.sh, to facilitate building TDLib from source for macOS with the appropriate deployment target. - Modified .gitignore to exclude the new tdlib-local and tdlib-build directories. - Updated tauri.conf.json to streamline TDLib references and ensure compatibility with the new bundling process. - Removed outdated bundling scripts to simplify the build workflow. * Refactor socket management and update dependencies - Updated `build.rs` to correctly reference architecture-specific paths for local TDLib builds. - Replaced `rust_socketio` with `tf-rust-socketio` in `Cargo.toml` and `socket_manager.rs` to align with the new dependency structure. - Enhanced logging in `socket_manager.rs` for better connection diagnostics and pre-flight checks. - Updated `build-tdlib-from-source.sh` to define architecture-specific build and install directories, improving build isolation. * Update TDLib installation process and refine socket payload handling - Modified `build-tdlib-from-source.sh` to manually install `tdjson` libraries, addressing potential installation failures. - Updated `socket_manager.rs` to handle payloads with an additional parameter in `Payload::Text`, improving data extraction and connection management. * Add macOS TDLib binary for version 1.8.29 - Introduced the `libtdjson.1.8.29.dylib` binary to the macOS TDLib prebuilt directory, enabling integration with the latest TDLib features and improvements. * Refactor SocketManager to use WebSocket and update dependencies - Replaced `tf-rust-socketio` with a WebSocket-based implementation using `tokio-tungstenite`, enhancing connection stability and compatibility. - Updated `Cargo.toml` to include new features for `reqwest` and removed deprecated dependencies. - Improved documentation in `socket_manager.rs` to clarify the new WebSocket connection handling and its implications for Android. - Streamlined connection lifecycle management and error handling for better performance and maintainability.
112 lines
3.7 KiB
TOML
112 lines
3.7 KiB
TOML
[package]
|
|
name = "AlphaHuman"
|
|
version = "0.30.0"
|
|
description = "AlphaHuman - AI-powered Super Assistant"
|
|
authors = ["AlphaHuman"]
|
|
edition = "2021"
|
|
|
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
|
|
[lib]
|
|
# The `_lib` suffix may seem redundant but it is necessary
|
|
# to make the lib name unique and wouldn't conflict with the bin name.
|
|
# This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519
|
|
name = "tauri_app_lib"
|
|
crate-type = ["staticlib", "cdylib", "rlib"]
|
|
|
|
[build-dependencies]
|
|
tauri-build = { version = "2", features = [] }
|
|
|
|
[dependencies]
|
|
# Tauri core and plugins
|
|
tauri = { version = "2", features = ["tray-icon", "macos-private-api"] }
|
|
tauri-plugin-opener = "2"
|
|
tauri-plugin-deep-link = "2.0.0"
|
|
tauri-plugin-os = "2"
|
|
# tauri-plugin-autostart moved to desktop-only target section
|
|
# tauri-plugin-notification moved to desktop-only target section
|
|
# Serialization
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
|
|
# HTTP client (rustls for cross-platform TLS support including Android)
|
|
reqwest = { version = "0.12", default-features = false, features = ["json", "blocking", "rustls-tls", "stream"] }
|
|
|
|
# Async runtime
|
|
tokio = { version = "1", features = ["full", "sync"] }
|
|
|
|
# keyring moved to desktop-only target section (not supported on Android/iOS)
|
|
|
|
# Concurrency utilities
|
|
once_cell = "1.19"
|
|
parking_lot = "0.12"
|
|
|
|
# Logging
|
|
log = "0.4"
|
|
env_logger = "0.11"
|
|
|
|
# .env file loading
|
|
dotenvy = "0.15"
|
|
|
|
# AI module dependencies
|
|
base64 = "0.22"
|
|
aes-gcm = "0.10"
|
|
argon2 = "0.5"
|
|
rand = "0.8"
|
|
dirs = "5"
|
|
sha2 = "0.10"
|
|
uuid = { version = "1", features = ["v4"] }
|
|
|
|
# V8 JavaScript runtime moved to desktop-only (not available on Android/iOS)
|
|
|
|
# WebSocket client for TDLib connections
|
|
tokio-tungstenite = { version = "0.24", features = ["rustls-tls-webpki-roots"] }
|
|
|
|
# HTTP streaming support for fetch polyfill
|
|
futures = "0.3"
|
|
|
|
# Embedded SQLite for skill databases
|
|
rusqlite = { version = "0.31", features = ["bundled"] }
|
|
|
|
# Date/time utilities
|
|
chrono = { version = "0.4", features = ["serde"] }
|
|
|
|
# Cron expression parsing for scheduled skill tasks
|
|
cron = "0.12"
|
|
|
|
# Stream/Sink utilities for WebSocket and HTTP streaming
|
|
futures-util = "0.3"
|
|
|
|
# Android uses a simpler approach - no persistent Socket.io (use web socket from frontend)
|
|
[target.'cfg(target_os = "android")'.dependencies]
|
|
# Android logging (routes Rust `log` crate to logcat)
|
|
android_logger = "0.14"
|
|
|
|
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
|
|
keyring = "3"
|
|
tauri-plugin-autostart = "2"
|
|
tauri-plugin-notification = "2"
|
|
|
|
# QuickJS JavaScript runtime (via quickjs-rs)
|
|
# Only available on desktop - prebuilt binaries don't exist for Android/iOS
|
|
rquickjs = { version = "0.11", features = ["futures", "macro", "loader", "parallel"] }
|
|
|
|
# TDLib Rust bindings (desktop only - downloads prebuilt TDLib for linking)
|
|
# On macOS, the bundled dylib is replaced with a source-built version (see build.rs)
|
|
# to ensure macOS 10.15 deployment target compatibility.
|
|
tdlib-rs = { version = "1.2", features = ["download-tdlib"] }
|
|
|
|
# Local LLM inference - desktop only (llama.cpp requires native C++ compilation)
|
|
# Disable default features (including openmp) to avoid cross-compilation issues
|
|
# on macOS where Homebrew installs ARM64-only OpenMP libraries
|
|
llama-cpp-2 = { version = "0.1", default-features = false }
|
|
encoding_rs = "0.8"
|
|
|
|
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.build-dependencies]
|
|
# TDLib build configuration (download-tdlib for all desktop platforms)
|
|
tdlib-rs = { version = "1.2", features = ["download-tdlib"] }
|
|
|
|
[features]
|
|
# This feature is used for production builds or when a dev server is not specified, DO NOT REMOVE!!
|
|
custom-protocol = ["tauri/custom-protocol"]
|