This workspace contains crates for the behavioral experiment framework decide
.
decide-protocol
: protobuf definitions, error types, theComponent
trait, and trait implementations for transforming betweentmq::Multipart
messages and the types used internallydecide-core
: the main logic for initializing components and routing messages between clients and componentscomponents/*
: crates with a type that implementsdecide_protocol::Component
Since this workspace only contains a single binary crate, decide-core
, you can use cargo build
and cargo run
as normal. If you want to set feature flags (e.g. dummy-mode
, see [decide-core/src/lib.rs] for details), you can pass them from the command line, like
cargo run --features dummy-mode
.
To compile for a specific architecture (BBB in our case), use cross
(make sure you have docker
installed):
cargo install cross
docker build -t decide-rs/image:tag ./
cross build --target armv7-unknown-linux-gnueabihf --release
Logging level defaults to INFO, but can be overwritten with export DECIDE_LOG="value"
The tests require a running instance of decide
, otherwise they will hang.
mkdir -p ~/.config/decide/
ln -s components/lights/tests/components.yml ~/.config/decide/
cargo run &
cargo test
kill $(jobs -l -p)