3 releases
new 0.1.2 | Feb 13, 2025 |
---|---|
0.1.1 | Feb 13, 2025 |
0.1.0 | Feb 13, 2025 |
#587 in Embedded development
371 downloads per month
15KB
162 lines
exo_task
A lightweight async task executor for bare metal (or any) systems, supporting no_std
environments.
Features
- Fully
no_std
compatible (requiresalloc
) - Two executor implementations:
- Simple FIFO-based executor for basic needs
- Advanced executor with proper waking mechanisms
- Configurable platform support (x86_64 feature flag)
- Efficient task management with unique task IDs
- Waker caching for better performance
Usage
Add this to your Cargo.toml
:
[dependencies]
exo_task = "0.1.2"
For x86_64 platform support without std
:
[dependencies]
exo_task = { version = "0.1.2", default-features = false, features = ["x86_64"] }
Example
use exo_task::{Task, SimpleExecutor};
async fn example_task() {
// Your async code here
}
let mut executor = SimpleExecutor::new();
executor.spawn(Task::new(example_task()));
executor.run();
Requirements
- Rust nightly
- Working allocator implementation
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Note: This licensing applies only to the current branch.
Credits
This crate is based on Philipp Oppermann's Async/Await implementation from his "Writing an OS in Rust" series, adapted into a standalone crate for broader use.
Documentation and comments were enhanced using GitHub Copilot while preserving the original code functionality.
Contributing
Unless explicitly stated otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Status
This project is currently in development. API may change between versions.
Dependencies
~125–275KB