rs_taskflow_derive 0.1.0

A library for executing graphs of tasks
Documentation
  • Coverage
  • 0%
    0 out of 6 items documented0 out of 5 items with examples
  • Size
  • Source code size: 21.95 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 356.81 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 5s Average build duration of successful builds.
  • all releases: 5s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • mm318/rs_taskflow
    0 1 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • mm318

rs_taskflow

Attempt at recreating https://github.com/cpp-taskflow/cpp-taskflow in Rust.

build

Example:

#[derive_task((i32,), (i32,))]
struct FlowTask;

let mut flow = Flow::new();

let a = flow.new_task(FlowTask::new(|x: &i32| *x + 1));
let b = flow.new_task(FlowTask::new(|x: &i32| *x - 2));
let c = flow.new_task(FlowTask::new(|x: &i32| *x + 3));

flow.connect_output0_to_input0(&a, &b);
flow.connect_output0_to_input0(&b, &c);

let flow_exec = flow.execute().await;
let result = flow_exec.get_output_0(&c);

For a more complete example, see full_example_test.rs.

Usage

Installation

git clone https://github.com/mm318/rs_taskflow.git

Build

For development iterations

# disables use of the macros in rs_taskflow_derive
cargo test --no-default-features -- --nocapture

For testing build with more debug messages

cargo test -- --nocapture

For testing release build

cargo test --release -- --nocapture

Requirements

Developed using Ubuntu 20.04 and Rust 1.64.
Tested nightly using ubuntu-latest and latest stable Rust (as fetched by actions-rs/toolchain@v1).