Commit Graph
7 Commits
Author SHA1 Message Date
TechnoPorg 6f7a58e4c5 Fix CI 2026-02-11 22:29:54 +01:00
TechnoPorg 86787b3a0d Update tests, examples, benches 2026-02-11 22:01:50 +01:00
TechnoPorg 1c9034de71 Don't require an explicit return type in the task macro 2026-01-28 08:52:52 +01:00
TechnoPorg 85ccd7e507 Update tests, examples, benches 2026-01-22 00:30:48 +01:00
swaits fad97dbf16 fix: support arbitrary types in task dependencies
Enable tasks to accept ANY type implementing Clone + Send + Sync as
dependencies, without requiring users to implement ExtractInput trait.

The #[task] macro now generates task-specific extraction logic inline
via a new extract_and_run() method. This leverages the macro's perfect
compile-time knowledge of parameter types to handle extraction for:
- Zero parameters (unit type, source tasks)
- Single parameter (any Clone + Send + Sync type)
- Multiple parameters (tuples, awaited concurrently)

Previously, only hardcoded primitive types and specific stdlib types
worked. Custom user types required manual ExtractInput implementations.
Now custom types work automatically with zero API changes.

Changes:
- Add extract_and_run() method to Task trait (internal/hidden)
- Generate inline extraction in #[task] macro based on parameter count
- Remove ExtractInput bound from DagRunner::add_task()
- Retain ExtractInput for internal task_fn() test helper
- Add comprehensive custom type tests

No breaking changes - purely internal implementation improvement.
2025-10-10 17:06:38 -06:00
swaits 400c01d73c test: increase coverage to 93% 2025-10-07 17:29:08 -07:00
swaits 7412287ee4 feat: dagrunner, initial version 2025-10-07 16:31:03 -07:00