#async-executor #constrained #environments #std #spin #thread-safe #version

synergetic

Minimal tick-based async executor for constrained environments

2 releases

0.1.2 Feb 13, 2023
0.1.1 Feb 13, 2023
0.1.0 Feb 13, 2023

#1125 in Embedded development

MIT license

7KB
110 lines

synergetic

synergetic is a tick-based, thread-local async executor intended for more constrained environments that lack std but do have access to an allocator.

An optional, thread-safe version is provided using spin

Alternatives:

  • embassy can be used if you want a full async runtime suitable for embedded development.

  • async-executor is a better option if std is available and the only thing you are needing is an async executor.

  • smol can be used if you just want a small, but fully featured runtime.

Examples

use synergetic::LockingExecutor;

let mut executor = LockingExecutor::new();

let task = executor.spawn(async {
        println!("hello world");
});

loop {
    executor.tick();
    if executor.done() {
        break;
    }
}

Dependencies

~245KB