Alat is a Rust-based device unification project with the slogan "That's one device that's all your devices." It represents a complete reimagination of the original Alat project, moving from a complex multi-component architecture to a simpler, more robust design that prioritizes system integration over standalone applications.
The project aims to unify devices into a single computational fabric, where devices are not merely "connected" but truly integrated regardless of their type (as long as they support the Alat protocol).
-
nlem(Core): The "heart" of the system (namednleminstead ofcoreto follow Rust crate naming conventions)- Implements the central
Nodecoordinator - Provides
Services(modular functionality units) andControllers(components that consume services) - Handles device management, security, discovery, and communication protocols
- Uses channel-based communication instead of shared mutable state
- Implements the central
-
platform(Platform Abstraction): OS-specific bindings- Currently implements Linux support
- Provides platform-specific functionality (hostname, config directories, notifications, etc.)
- Uses
cfg-iffor conditional compilation across platforms
-
app(UI/Application): Cross-platform interface- Built with Slint for Material Design UI
- Minimal interface focused on initial setup and monitoring
- Designed to integrate with the operating system rather than be a standalone application
- Channel-based messaging: Components communicate via dedicated channels instead of shared state
- Node-centric: The
Nodeacts as the central coordinator that processes events and relays messages - Event-driven: UI receives
NodeEventnotifications to maintain state
- Services: Implement the
Servicetrait and may provide:- Worker threads/tasks
- gRPC servers
- Client implementations
- Storage partitions for cache/config/temp
- Controllers: Consume services to perform operations like:
- Clipboard synchronization
- File transfer
- Notification forwarding
- Media control
- Language: Rust (edition 2021/2024)
- UI Framework: Slint (for cross-platform GUI with Material Design)
- Async Runtime: Tokio (with multi-threaded runtime)
- RPC/Protocol: Tonic + Prost (gRPC with Protocol Buffers)
- Data Serialization: Serde + serde_json
- Platform Integration: Various crates for system integration (hostname, dirs, notify-rust, battery, sysinfo)
- UDP broadcast on port 4147 for device discovery
- Devices advertise every 5 seconds
- Devices considered lost after 15 seconds of no advertisement
- More reliable and simpler than mDNS while maintaining cross-platform compatibility
- Each device has a unique ID and certificate
- Pairing involves secure certificate exchange with user confirmation
- User approval via desktop notifications (Linux) ensures security
- Configuration and paired device data stored in JSON format
- Location:
~/.config/cm.engon.alat/data.jsonon Linux - Structured for easy migration and backup
- Bacon: Configured in
bacon.tomlas the primary development toolbacon run: Run the applicationbacon check: Check for compilation errorsbacon clippy: Run Clippy linterbacon test: Run testsbacon doc: Generate documentation
- Defined in
Cargo.tomlwith members:app,nlem,platform - Shared dependencies defined in workspace section
- Uses resolver version 3
- app: slint, platform, nlem, tokio
- nlem: prost, serde, tonic, rand, thiserror
- platform: cfg-if, hostname, dirs, notify-rust, sysinfo, battery
The project is in early development stages. As noted in the README, the developer acknowledges being "not that fast as a rust beginner" and that the project is "nothing but starting." Key areas that need development include:
- Implementation of core services (pairing, telemetry, etc.)
- Development of controllers (clipboard sync, file transfer, etc.)
- Expansion to additional platforms (macOS, Windows)
- Mobile client integration
- Advanced discovery options (Bluetooth, Wi-Fi Direct)
- Code Style: Follows Rust standard formatting (
cargo fmt) - Error Handling: Uses
thiserrorfor custom error types - Async Patterns: Uses
tokio::mainfor async main functions - State Management: Uses
Arc<RwLock<T>>for shared state with channel-based communication - Testing: Currently limited; the developer notes "You will notice I'm not the one to write tests, they're even worse than docs."
- Email: engonken8@gmail.com or me@engon.cm
- Alat Project Website: https://alat.engon.cm
- Developer Portfolio: https://engon.cm
- Original Project: https://github.com/ken-morel/alat-old
- The name "Alat" means "to link" in some languages, reflecting the application's purpose
- "nlem" means "heart" in the developer's naming convention
- The project follows a custom license that permits educational use and contributions but prohibits commercial use without explicit permission
- The developer humorously notes that "whatever way you try to pronounce 'alat' and especially 'nlem', your are surely not doing it right"
This documentation provides a comprehensive overview of the Alat project for future development and maintenance work.