mirror of
https://github.com/Cisco-Talos/clamav.git
synced 2026-05-07 15:15:40 -04:00
Use bindgen to generate Rust-bindings for some libclamav internal functions and structures in an new "sys.rs" module. "sys.rs" will be generated at build-time and unfortunately must be dropped in the source/libclamav_rust/src directory rather than under the build directory. As far as I know, Cargo/Rust provide no way to set an include path to the build directory to separately place generated files. TODO: Verify if this is true and move sys.rs to the build directory if possible. Using the new bindings with: - the logging module. - the cdiff module. Also: - Removed clamav_rust.h from .gitignore, because we generate it in the build directory now. - Removed the hand-written bindings from the cbindgen exclusions. lib.rs has an annotation that prevents cbindgen from looking at sys.rs. - Fixed a `u8` -> `c_char` type issue in cdiff in the cli_getdsig() call parameters.