Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
gtasks_core
gtasks_core is the foundational engine and synchronization library behind gtasks, a modern Google Tasks client ecosystem for Linux. It provides low-level integrations for OAuth 2.0 PKCE authentication, SQLite database operations, real-time sync conflict handling, and natural language date parsing.
This library can be used independently to build custom clients, automation daemons, or scripting utilities interacting with the Google Tasks API.
🚀 Key Features
- 🔄 Delta Synchronization Engine: Efficiently syncs remote changes using
updatedtimestamps. Tracks local modifications with a dirty-bit state to push changes back upstream. - 📴 Offline-First Storage: Integrated thread-safe SQLite database wrapper (
rusqlite) that manages local schemas, transactions, and soft-deletions. - 🔑 Secure Credentials Flow: Implements standard OAuth 2.0 Authorization Code Flow with PKCE. Saves encrypted refresh tokens securely using the OS Keyring (
keyringcrate targeting D-Bus Secret Service, KWallet, etc.). - 🌲 Hierarchy Processing: Processes list responses into parent-child subtask trees, preserving visual ordering.
- 🧠 Natural Language Parsing: Parses smart terms (like
"tomorrow","next monday") directly from string inputs to set appropriate task due dates.
🛠️ Usage & Examples
1. Connecting and Authenticating
The engine handles the login state automatically, requesting user authentication via browser loopback server if no refresh token is stored in the system keyring.
use obtain_authenticated_client;
async
2. Initializing the Local SQLite Database
gtasks_core packages a database manager that automatically sets up and manages tables for lists and tasks:
use Database;
3. Parsing Natural Language Dates
You can extract dates from user input:
use parse_nlp_task;
🧱 Architecture Details
┌───────────────────────────────────────┐
│ Client Application │
└───────────┬───────────────────┬───────┘
│ │
▼ ▼
┌───────────────────────────────────────┐
│ gtasks_core API │
└───────────┬───────────────────┬───────┘
│ │
▼ ▼
┌───────────────────────┐ ┌───────────────────────┐
│ Local DB (SQLite) │ │ Google REST API Sync │
└───────────────────────┘ └───────────────────────┘
The core is structured as:
api: Wrappers around the Google Tasks REST endpoints.auth: PKCE flow logic and OS keychain integration.db: Thread-safe database transactions and updates.sync: Synchronization worker coordination.util: Date extraction, task trees, and helpers.
🛠️ System Prerequisites
Building the crate requires standard SSL, Secret Service, and GCC headers on your system:
# Ubuntu / Debian
# Fedora
# Arch Linux
🤝 Contributing
Contributions are welcome! Submit a PR or open issues for feature requests.
📄 License
This library is licensed under the MIT License.