This guide provides technical details for developing and troubleshooting the boot-rust plugin.
boot-core discovers and communicates with plugins based on a simple contract:
- First line on
stdout: Must be the handshake string in the format1|1|tcp|HOST:PORT|grpc. - All other output: All logs, warnings, and errors must be sent to
stderr. This keepsstdoutclean so the handshake is not corrupted.
You can quickly test that the binary is producing the correct handshake and that logs are properly sent to stderr.
# From the boot-rust project root, run the release binary and grab the first line of stdout
./target/release/boot-rust 2>/dev/null | head -1Expected Output:
1|1|tcp|127.0.0.1:<PORT>|grpc
Note: If you see a "Broken pipe" error, it's often because a previous version of the binary was logging to stdout. Rebuild with cargo build --release to ensure logs are correctly sent to stderr.
boot-core discovers the plugin by finding an executable named boot-rust on its PATH.
From the boot-core directory, run this command to see which boot-rust executable Poetry's environment will use:
poetry run which -a boot-rustFor rapid testing, you can run boot-core and temporarily add your local plugin build to the PATH for that single command:
# Run this from the boot-core directory
poetry run env PATH="/path/to/your/boot-rust/target/release:$PATH" \
boot generate my_rust_spec.tomlIf which boot-rust points to an old version, remove it:
# If installed via cargo
cargo uninstall boot-rust
# Or remove a manually copied file
rm -f ~/.cargo/bin/boot-rust
# Clear the shell's command cache
hash -r- Format Code:
cargo fmt --all - Lint Code:
cargo clippy --all-targets -- -D warnings - Run Unit Tests:
cargo test
-
Plugin executable not found: This is aPATHissue.boot-corecannot find theboot-rustbinary. Ensure you have runcargo install --path . --forceand that~/.cargo/binis in your shell'sPATH. -
Invalid handshake/not enough values to unpack: This means the plugin wrote something tostdoutbefore the handshake string. Use the "Testing the Binary" command above to verify the output is clean.