# Requirements
This crate is a Rust binding to FlowBrigade's Nim implementation.
It does not reimplement FlowBrigade in Rust. During `cargo build`, the build
script links the Rust wrapper to FlowBrigade's native C ABI library.
## Required By Default
- Rust and Cargo
- Nim
- Nimble
- FlowBrigade installed through Nimble
- A C compiler usable by Nim, such as `clang` or `gcc`
Install the Nim package before building a Rust project that depends on this
crate:
```sh
nimble refresh
nimble install flowbrigade
```
The build script then uses:
```sh
nimble path flowbrigade
```
to locate the installed Nim package and build the native C ABI library into
Cargo's build output directory.
## Local FlowBrigade Checkout
When developing against a local FlowBrigade checkout, set
`FLOWBRIGADE_SOURCE_DIR`:
```sh
FLOWBRIGADE_SOURCE_DIR=/path/to/flowbrigade cargo test
```
## Prebuilt Or Manually Built Native Library
If a native FlowBrigade library already exists, set `FLOWBRIGADE_LIB_DIR` to the
directory containing the library:
```sh
FLOWBRIGADE_LIB_DIR=/path/to/lib cargo test
```
The directory should contain one of:
- `libflowbrigade.so` on Linux
- `libflowbrigade.dylib` on macOS
- `flowbrigade.dll` on Windows
## Version Compatibility
`flowbrigade` Rust crate `0.1.4` targets FlowBrigade core `0.4.1` or later and
FlowBrigade C ABI version `2`.
The Rust crate version and FlowBrigade core version are intentionally separate.