Add ClamAV 1.5 APIs and bump version to 1.5.0#6
Conversation
4676c7a to
ddd08b5
Compare
There was a problem hiding this comment.
Pull request overview
Updates clamav-sys to target ClamAV 1.5.x, extending the generated bindings while changing build-time dependency discovery to prefer explicitly provided include/library paths over auto-discovery.
Changes:
- Add additional ClamAV 1.5 API symbols to bindgen allowlists and bump crate version to
1.5.0. - Rework
build.rsdependency discovery to prioritize manual paths (CLAMAV_LIBRARY/CLAMAV_INCLUDE) and rename OpenSSL override handling toOPENSSL_INCLUDE. - Update build documentation and add repository policy docs (
SECURITY.md,CODE_OF_CONDUCT.md).
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
src/lib.rs |
Removes transmute usage in enum conversions (safer cast-based conversions). |
build.rs |
Adds ClamAV 1.5 allowlisted symbols and implements manual-first discovery via env vars. |
README.md |
Documents the new discovery order and override variables (plus updated examples). |
Cargo.toml |
Bumps crate version to 1.5.0 and updates author list. |
SECURITY.md |
Adds a security policy and vulnerability reporting guidance. |
CODE_OF_CONDUCT.md |
Adds a community code of conduct. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
a65d660 to
d60df56
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
5a23657 to
52ba7d2
Compare
Change build behavior to prioritize manually specified header and library paths, when specified. Change the environment variable names used when manually specifying the header and library paths from: - CLAMAV_SOURCE - CLAMAV_BUILD - OPENSSL_ROOT_DIR To: - CLAMAV_INCLUDE - CLAMAV_LIBRARY - OPENSSL_INCLUDE Pkgconfig (unix) and Vcpkg (Windows) are now only used when the builder does not provide explicit paths for the required files. This is to prevent pkgconfig and vcpkg to be unintentionally used when present on a system but a specific version of either dependency is desired. CLAM-2881
7650ff3 to
b6dfff0
Compare
b6dfff0 to
568461c
Compare
Detect CLAMAV_VERSION_NUM from the installed headers at build time and set a cfg for ClamAV 1.0.0 or newer. Use that cfg to call cl_strerror with cl_error_t for newer releases and with int for older releases, since bindgen reflects the API shape provided by the installed ClamAV headers and older vcpkg packages still expose the pre-1.0.0 signature.
5521584 to
676aedb
Compare
Change build behavior to prioritize manually specified header
and library paths, when specified.
Change the environment variable names used when manually specifying
the header and library paths from:
To:
Pkgconfig (unix) and Vcpkg (Windows) are now only used when the builder
does not provide explicit paths for the required files.
This is to prevent pkgconfig and vcpkg to be unintentionally used when
present on a system but a specific version of either dependency is
desired.
CLAM-2881