Enables building macOS agents (Intel and Apple Silicon) on Linux server without requiring Mac hardware. Successfully tested on M3 MacBook Air. Changes: - Configure rustls for macOS builds (easier cross-compilation) - Keep native-tls for Windows/Linux (Windows 7 compatibility) - Add osxcross linker configuration for both architectures - Create build-macos.sh script for automated builds - Document complete setup in MACOS_BUILD.md Technical Details: - Build server: 172.16.3.30 (Ubuntu 22.04) - Toolchain: osxcross 1.5 with macOS SDK 14.5 - Targets: x86_64-apple-darwin, aarch64-apple-darwin - Binary sizes: ~3.5M (Intel), ~3.1M (ARM64) - Build time: ~90 seconds per target Tested: Successfully connected to wss://rmm-api.azcomputerguru.com/ws Agent ID: 6177bcac-e046-4166-ac76-a6db68a363ab Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
98 lines
2.7 KiB
TOML
98 lines
2.7 KiB
TOML
[package]
|
|
name = "gururmm-agent"
|
|
version = "0.6.0"
|
|
edition = "2021"
|
|
description = "GuruRMM Agent - Cross-platform RMM agent"
|
|
authors = ["GuruRMM"]
|
|
|
|
[features]
|
|
default = ["native-service"]
|
|
# Modern Windows (10+, Server 2016+): Native Windows Service integration
|
|
native-service = ["dep:windows-service", "dep:windows"]
|
|
# Legacy Windows (7, Server 2008 R2): Console mode, use NSSM for service wrapper
|
|
legacy = []
|
|
|
|
[dependencies]
|
|
# Async runtime
|
|
tokio = { version = "1", features = ["full"] }
|
|
|
|
# System information (cross-platform metrics)
|
|
sysinfo = "0.31"
|
|
|
|
# WebSocket - futures utilities
|
|
futures-util = "0.3"
|
|
|
|
# Serialization
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
toml = "0.8"
|
|
|
|
# CLI arguments
|
|
clap = { version = "4", features = ["derive"] }
|
|
|
|
# Logging
|
|
tracing = "0.1"
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
|
|
|
# Error handling
|
|
anyhow = "1"
|
|
thiserror = "1"
|
|
|
|
# UUID for identifiers
|
|
uuid = { version = "1", features = ["v4", "serde"] }
|
|
|
|
# URL parsing for download validation
|
|
url = "2"
|
|
|
|
# SHA256 checksums for update verification
|
|
sha2 = "0.10"
|
|
|
|
# Time handling
|
|
chrono = { version = "0.4", features = ["serde"] }
|
|
|
|
# Lazy static initialization for Claude executor
|
|
once_cell = "1.19"
|
|
|
|
# Hostname detection
|
|
hostname = "0.4"
|
|
|
|
# Network interface enumeration (LAN IPs)
|
|
local-ip-address = "0.6"
|
|
|
|
# Async file operations
|
|
tokio-util = "0.7"
|
|
|
|
# Platform-specific TLS dependencies
|
|
[target.'cfg(not(target_os = "macos"))'.dependencies]
|
|
# WebSocket client - native-tls for Windows/Linux (Windows 7 compatibility)
|
|
tokio-tungstenite = { version = "0.24", features = ["native-tls"] }
|
|
# HTTP client - native-tls for Windows 7/2008R2 compatibility
|
|
reqwest = { version = "0.12", default-features = false, features = ["json", "native-tls"] }
|
|
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
# WebSocket client - rustls for macOS (easier cross-compilation)
|
|
tokio-tungstenite = { version = "0.24", features = ["rustls-tls-native-roots"] }
|
|
# HTTP client - rustls for macOS
|
|
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls-native-roots", "blocking"] }
|
|
|
|
[target.'cfg(windows)'.dependencies]
|
|
# Windows service support (optional, only for native-service feature)
|
|
windows-service = { version = "0.7", optional = true }
|
|
# Windows-specific APIs for service management (optional)
|
|
windows = { version = "0.58", optional = true, features = [
|
|
"Win32_System_Services",
|
|
"Win32_Foundation",
|
|
"Win32_Security",
|
|
] }
|
|
|
|
[target.'cfg(unix)'.dependencies]
|
|
# Unix signal handling and user detection
|
|
nix = { version = "0.29", features = ["signal", "user"] }
|
|
|
|
[profile.release]
|
|
# Optimize for size while maintaining performance
|
|
opt-level = "z"
|
|
lto = true
|
|
codegen-units = 1
|
|
strip = true
|