Add Makefile with standard targets for building, testing, and linting: - test: Run all workspace tests - clippy: Lint code with clippy - fmt: Check code formatting - check: Full quality check (fmt + clippy + test) - build: Build release version - clean: Clean build artifacts
This provides a consistent interface for building and testing the Rust implementation. Signed-off-by: Kefu Chai <[email protected]> --- src/pmxcfs-rs/.gitignore | 1 + src/pmxcfs-rs/Makefile | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 src/pmxcfs-rs/.gitignore create mode 100644 src/pmxcfs-rs/Makefile diff --git a/src/pmxcfs-rs/.gitignore b/src/pmxcfs-rs/.gitignore new file mode 100644 index 00000000..ea8c4bf7 --- /dev/null +++ b/src/pmxcfs-rs/.gitignore @@ -0,0 +1 @@ +/target diff --git a/src/pmxcfs-rs/Makefile b/src/pmxcfs-rs/Makefile new file mode 100644 index 00000000..eaa96317 --- /dev/null +++ b/src/pmxcfs-rs/Makefile @@ -0,0 +1,39 @@ +.PHONY: all test lint clippy fmt check build clean help + +# Default target +all: check build + +# Run all tests +test: + cargo test --workspace + +# Lint with clippy (using proxmox-backup style: only fail on correctness issues) +clippy: + cargo clippy --workspace -- -A clippy::all -D clippy::correctness + +# Check code formatting +fmt: + cargo fmt --all --check + +# Full quality check (format + lint + test) +check: fmt clippy test + +# Build release version +build: + cargo build --workspace --release + +# Clean build artifacts +clean: + cargo clean + +# Show available targets +help: + @echo "Available targets:" + @echo " all - Run check and build (default)" + @echo " test - Run all tests" + @echo " clippy - Run clippy linter" + @echo " fmt - Check code formatting" + @echo " check - Run fmt + clippy + test" + @echo " build - Build release version" + @echo " clean - Clean build artifacts" + @echo " help - Show this help message" -- 2.47.3 _______________________________________________ pve-devel mailing list [email protected] https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
