This is a Rust implementation of the OpenVoiceOS (OVOS) messagebus, providing a fast and efficient communication backbone for OVOS components. Think of it as the "nervous system" of the OVOS platform.
- Rust (latest stable version recommended)
- Cargo (comes with Rust)
Clone the repository and navigate to the project directory:
git clone https://github.com/OscillateLabsLLC/ovos-rust-messagebus
cd ovos-rust-messagebus
To build and run the project in debug mode:
cargo build
cargo run
For production use, compile with optimizations:
cargo build --release
The optimized ovos_messagebus
binary will be in the target/release
directory.
Since there is no Rust port of ovos-utils, configuration is done via environment variables and/or a configuration file.
The most backwards-compatible option is to set the OVOS_BUS_CONFIG_FILE
environment variable:
OVOS_BUS_CONFIG_FILE=/home/ovos/.config/mycroft/mycroft.conf /usr/local/bin/ovos_messagebus
# or
OVOS_BUS_CONFIG_FILE=/home/neon/.config/neon/neon.yaml /usr/local/bin/ovos_messagebus
The configuration file should be in YAML or JSON format. Comments (lines starting with //
) in JSON are supported and will be stripped before parsing. Please note that this is not a full implementation of JSONC.
Alternatively, you can set the environment variables directly:
OVOS_BUS_HOST=10.10.10.10 OVOS_BUS_PORT=8181 /usr/local/bin/ovos_messagebus
OVOS_BUS_HOST
(default:127.0.0.1
)OVOS_BUS_PORT
(default:8181
)OVOS_BUS_CONFIG_FILE
(default: none)OVOS_BUS_MAX_MSG_SIZE
(default:25
, in MB)OVOS_BUS_ROUTE
(default:/core
)OVOS_BUS_USE_SSL
(default:false
) NOTE: If the environment variable exists SSL will be enabled.
Environment variables take precedence over settings in the configuration file.
Any other settings must be configured in mycroft.conf
or a similar OVOS-compatible configuration file.
This project includes a Dockerfile for creating a minimal container with the OVOS Rust Messagebus.
To build the Docker image, run the following command in the project root:
docker build -t ovos-rust-messagebus .
To run the container:
docker run -p 8181:8181 -e OVOS_BUS_HOST=127.0.0.1 ovos-rust-messagebus
You can adjust the port mapping and environment variables as needed.
To run the test suite:
cargo test
...except we don't have very many tests. Please feel free to contribute!
Contributions are welcome! Please feel free to submit a Pull Request.
Apache-2.0