This documents contains developments, testings, static analysis informations.
For detail, refer to installation.
The first priority is to use Containers, but direct build is also possible. (However, build errors may occur depending on the system.)
The project is using cargo as its build system and command is wrapped in Makefile.
The binaries and other artifacts (such as the man pages) can be built via:
# in src directory
make build
# same as
cd src/agent && cargo build
cd src/player && cargo build
cd src/server && cargo buildAfter successfully compiling the binaries, they will be in:
# only binaries appear in below
[root@HPC src]# ls agent/target/debug/
nodeagent
[root@HPC src]# ls player/target/debug/
actioncontroller statemanager filtergateway
[root@HPC src]# ls server/target/debug/
apiserver monitoringserver policymanagerYou can use these directly, but it is recommended to use containers.
# in root directory
make image
make installFor more details, refer to the Getting started
Rustfmt formats Rust code according to the official rust style guide. It enforces consistency across codebases and making code easier to read and review.
Step 1: Install Rustfmt.
rustup component add rustfmt Step 2: Format Your Code: Recursively formats all .rs files in the project.
# in src directory
make fmtClippy is a collection of lints to catch common mistakes and improve Rust code. It analyzes source code and provides suggestions for idiomatic Rust practices to performance improvements and potential bugs.
Step 1: Install Clippy.
rustup component add clippyStep 2: Run Clippy: Runs the linter on your project. It reports warnings and suggestions for your code.
# in src directory
make clippyOptional: Automatically fix warnings: Applies safe automatic fixes to clippy warnings.
# directory located `Cargo.toml` like `src/server/apiserver`
cargo clippy --fixcargo audit - Security vulnerability scanner
Cargo Audit scans your Cargo.lock file for crates with known security
vulnerabilities using the RustSec Advisory Database.
It helps you ensure your dependencies are secure.
Step 1: Install Cargo Audit.
cargo install cargo-auditStep 2: Run: Scans the dependency tree for known vulnerabilities and outdated crates.
# directory located `Cargo.lock` like `src/server`, `src/player`, `src/agent`
cargo auditcargo deny - Dependency & License checker
Cargo Deny checks for issues including:It’s used to enforce policies for project dependencies.
- Duplicate crates
- Insecure or unwanted licenses
- Vulnerabilities
- Unmaintained crates
Step 1: Install Cargo Deny
cargo install cargo-denyStep 2: Initialize Configuration (for New components only) - Creates a default deny.toml file where you can configure license policies, bans and exceptions.
# directory located `Cargo.toml` like `src/server/apiserver`
# almost all crates already done.
cargo deny initStep 3: Run Check - Analyzes dependency metadata and reports issues related to licenses, advisories and duplicates.
# directory located `Cargo.toml` like `src/server/apiserver`
cargo deny checkcargo udeps - Unused Dependency Detector
Cargo Udeps identifies unused dependencies in your Cargo.toml Keeping unused dependencies can bloat the project and expose unnecessary vulnerabilities."For this requires Nightly Rust to run".
Caution : rustc 1.86.0 or above is required. (on July 18th, 2025)
Step 1: Install Cargo Udeps
cargo install cargo-udeps
rustup install nightlyStep 2: Nightly run - This runs the unused dependency checker and lists packages not being used.
cargo +nightly udepsUnit tests can be executed using following commands:
# in any directories include `Cargo.toml`
cargo testSome Pullpiri modules has tests folder.
# in src/server/apiserver directory
[root@HPC apiserver]# tree
.
├── apiserver.md
├── Cargo.toml
├── src
......
└── tests
├── api_integration.rs
├── apiserver_init.rs
├── filtergateway_integration.rs
└── manager_integration.rsFor general information of integration testing, refer to rust doc.
cargo tarpaulin - Code coverage
cargo-tarpaulin is a code coverage tool specifically designed for Rust projects. It works by instrumenting the Rust code, running the tests,and generating a detailed report that shows which lines of code were covered during testing. It supports a variety of Rust test strategies, including unit tests and integration tests.
To use cargo-tarpaulin you need to install it on your system. This can be done easily via cargo:
cargo install cargo-tarpaulin
#Once installed, you can run the tool in your project by using the following command:
# in any directories include `Cargo.toml`
cargo tarpaulinPullpiri uses ports from 47001 ~ 47099.
for gRPC
47001~
for REST
~47099
for etcd (default)
2379, 2380
Files for documentation of this project are located in the doc directory comprising:
- Getting Started: how to run
- Examples: directory containing all files and guides for performing example
- (Deprecated)
pullpiri.drawio: file containing all diagrams used for Pullpiri