This crate implements the core of TaskChampion, the replica.
Users of this crate can manipulate a task database using this API, including synchronizing that task database with others via a synchronization server.
Example uses of this crate:
- user interfaces for task management, such as mobile apps, web apps, or command-line interfaces
- integrations for task management, such as synchronization with ticket-tracking systems or request forms.
Replica
A TaskChampion replica is a local copy of a user's task data. As the name suggests, several replicas of the same data can exist (such as on a user's laptop and on their phone) and can synchronize with one another.
Replicas are accessed using the [Replica] type.
Task Storage
Replicas access the task database via a storage object.
The [storage] module supports pluggable storage for a replica's data.
An implementation is provided, but users of this crate can provide their own implementation as well.
Server
Replica synchronization takes place against a server.
Create a server with [ServerConfig].
The [server] module defines the interface a server must meet.
Several server implementations are included, and users can define their own implementations.
Example
#
#
Feature Flags
Support for some optional functionality is controlled by feature flags.
server-aws- sync to Amazon Web Servicesserver-gcp- sync to Google Cloud Platformserver-sync- sync to the taskchampion-sync-serverserver-local- sync to a local filesync- enables all of the sync features abovestorage-indexeddb- store task data in the browser using IndexedDB (WASM only)storage-sqlite- store task data locally in SQLitestorage- enables all of the storage features above exceptstorage-indexeddbbundled- activates bundling system libraries like sqlitetls-webpki-roots- use TLS roots bundled with the library, instead of reading them from system configuration.tls-native-roots- use native (system) TLS roots, instead of those bundled with rustls. If bothtls-webpki-rootsandtls-native-rootsare given,tls-native-rootstakes precedence. At least one of thetls-*-rootsfeatures must be enabled to support any of the HTTPS-basedserver-*features.
By default, sync, storage, bundled, and tls-webpki-roots are enabled.
WASM Support
TaskChampion can be built for WASM with the usual WASM tools, such as
wasm-pack. Only the following features are supported:
server-sync- communicate with the sync server using the Fetch APIstorage-indexeddb- store task data in the browser using IndexedDB (WASM only)
See Also
See the TaskChampion Book for more information about the design and usage of the tool.
Minimum Supported Rust Version (MSRV)
This crate supports Rust version 1.88.0 and higher.