# FreeRTOS-Next
Wrapper library to use FreeRTOS API in Rust.
To build an embedded application with FreeRTOS please refer
to [home](https://github.com/mcu-rust/FreeRTOS).
It needs [freertos-build](https://crates.io/crates/freertos-build) to work with.
## Usage
1. Checkout FreeRTOS: https://github.com/FreeRTOS/FreeRTOS-Kernel
1. Add dependencies to your Rust apps `Cargo.toml`
```shell
cargo add freertos-next
cargo add --build freertos-build
```
1. Add this snippet to your apps `build.rs`:
```rust
fn main() {
let mut b = freertos_build::Builder::new();
b.freertos("path/to/FreeRTOS-Kernel");
b.freertos_config("src"); b.freertos_port("GCC/ARM_CM3"); b.heap("heap_4.c");
b.compile().unwrap_or_else(|e| { panic!("{}", e.to_string()) });
}
```