6 releases
0.7.2 | Sep 16, 2024 |
---|---|
0.7.1 | Sep 16, 2024 |
0.6.1 | May 19, 2023 |
0.6.0 | Nov 24, 2021 |
0.3.1 | Nov 15, 2020 |
#154 in Embedded development
28 downloads per month
Used in 2 crates
31KB
764 lines
nostd_async
NOTE: nostd_async
is no longer under active development, I suggest using embassy instead, which has a much better async runtime.
Example
pub fn main() {
let runtime = nostd_async::Runtime::new();
let mut task = nostd_async::Task::new(async { println!("Hello World") });
let handle = task.spawn(&runtime);
handle.join();
}
Features
avr
Enables AVR Support.
- Disables interrupts when scheduling and descheduling tasks
- Waits for interrupts when there are no tasks remaining
cortex_m
Enables Cortex-M Support.
- Disables interrupts when scheduling and descheduling tasks
- Waits for events when there are no tasks remaining
lib.rs
:
Note
nostd_async
is no longer under active development, I suggest using embassy instead, which has a much better async runtime.
Example
let runtime = nostd_async::Runtime::new();
let mut task = nostd_async::Task::new(async {
println!("Hello World");
42
});
let handle = task.spawn(&runtime);
assert_eq!(handle.join(), 42);
See more examples in the examples directory
Dependencies
~0–8MB
~243K SLoC