TaskChampion implements the task storage and synchronization behind Taskwarrior. It includes an implementation with Rust and C APIs, allowing any application to maintain and manipulate its own replica. It also includes a specification for tasks and how they are synchronized, inviting alternative implementations of replicas or task servers.
See the documentation for more!
There are two crates here:
taskchampion(root of the repository) - the core of the toolxtask(private) - implementation of thecargo xtask msrvcommand
The Rust API, as defined in the docs, supports simple creation and manipulation of replicas and the tasks they contain.
The Rust API follows semantic versioning.
The ffi/ crate provides a UniFFI-based FFI layer for iOS consumption via SPM.
# Install Rust iOS targets + build XCFramework + generate Swift bindings
./scripts/build_xcframework.shThis produces:
TaskChampionFFIFFI.xcframework/— static library for iOS device + simulatorSources/TaskChampionFFI/TaskChampionFFI.swift— generated Swift bindings
-
Add this repo as a git submodule:
git submodule add https://github.com/tta-lab/taskchampion.git vendor/taskchampion
-
Run the build script:
cd vendor/taskchampion && ./scripts/build_xcframework.sh
-
In Xcode: Add Local Package → select
vendor/taskchampion/→ addTaskChampionFFIto your target. -
Import and use:
import TaskChampionFFI // Create a session once at login/startup let session = try FfiSession(executor: myExecutor, userId: userId) // All task operations are async let tasks = try await session.pendingTasks() let created = try await session.createTask(uuid: UUID().uuidString, description: "New task")