In the context of this project (and Flutter apps in general), we use Rust for:
-
Advanced Networking & Security:
- TLS Fingerprinting: Bypassing sophisticated bot detection (like Cloudflare) often requires low-level control over the TLS handshake (Client Hello), which Dart's
httpclient doesn't fully expose. We usereqwest+rustlsin Rust for this. - Custom Protocols: Implementing raw TCP/UDP protocols or specific encryption standards.
- TLS Fingerprinting: Bypassing sophisticated bot detection (like Cloudflare) often requires low-level control over the TLS handshake (Client Hello), which Dart's
-
High-Performance Computing:
- Heavy Data Processing: Parsing massive binaries, cryptography, or complex algorithms where Dart's garbage collector might cause stutter (jank) in the UI.
- Image/Video Processing: manipulating media frames in real-time.
-
Cross-Platform Shared Logic:
- Writing "Core Business Logic" once to run on Android, iOS, Windows, Linux, MacOS, and Web (via WASM) with identical behavior and performance.
For features like the Absensi (Attendance) parser:
- Speed vs Overhead: HTML parsing is fast. The time it takes to send a string from Dart to Rust (FFI) and back often takes longer than just parsing it in Dart for small documents.
- Developer Experience: UI features often change. Keeping the parsing logic in Dart (
siakad_parser.dart) means you can hot-reload and see changes instantly. Rust requires a recompile (minutes) for every change.