How to Work on Fidius¶
This guide covers the development tools and workflows for contributing to fidius.
Prerequisites¶
- Rust toolchain (stable)
- angreal — task runner
- pre-commit — git hook manager
Install Pre-commit Hooks¶
This enables three hooks that run on every commit:
- license-header — checks all
.rsfiles have the Apache 2.0 copyright header - rustfmt — checks code formatting
- clippy — runs clippy with
-D warnings
Angreal Tasks¶
| Command | Purpose |
|---|---|
angreal build |
cargo build --workspace |
angreal build --release |
Release build |
angreal test |
cargo test --workspace |
angreal test --release |
cargo test --workspace --release |
angreal check |
cargo check --workspace + cargo clippy --workspace |
angreal lint |
cargo fmt --all --check + clippy |
angreal license-header |
Add Apache 2.0 headers to all .rs files |
angreal license-header --check |
Check headers without modifying files |
The wire format is bincode in both debug and release builds (0.1.0+).
There's no longer a profile-specific wire path to regression-test, so
angreal test alone is sufficient for CI; --release is only useful when
you want optimized builds in the loop.
The Test Plugin¶
The tests/test-plugin-smoke/ directory contains a Calculator plugin used by integration tests. It is excluded from the workspace (Cargo.toml exclude field) and built by tests via cargo build --manifest-path.
To build it manually:
Regenerating API Docs¶
API reference docs are generated by plissken from doc comments in source code:
This writes to docs/api/. Re-run after changing doc comments.
Project Layout¶
fidius-core/ Shared types (both host and plugin depend on this)
fidius-macro/ Proc macros (#[plugin_interface], #[plugin_impl])
fidius-host/ Host-side loading, validation, calling
fidius-cli/ CLI binary (fidius)
fidius-test/ Testing helpers (dylib_fixture, signing fixtures)
fidius/ Facade crate re-exporting core + macro
tests/ Test fixtures (test-plugin-smoke)
docs/ Documentation (tutorials, how-to, reference, explanation, api)
.angreal/ Angreal task definitions