Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rust: put all rust/cargo env vars in CARGO_ENV
To ensure that all calls to cargo use the same environment variables, put the environment variables in CARGO_ENV so every call to cargo can easily use the same vars. The Cargo build system is smarter than make, it can detect a change in an environment variable that affects the build, and the setting of SURICATA_LUA_SYS_HEADER_DST changing could cause a rebuild. Also update suricata-lua-sys, which is smarter about copying headers. It will only copy if the destination does not exist, or the source header is newer than the target, which can also prevent unnecessary rebuilds. This is mainly to fix an issue where subsequent builds may fail, especially when running an editor with a LSP enabled: Update lua crate to 0.1.0-alpha.5. This update will force a rewrite of the headers if the env var SURICATA_LUA_SYS_HEADER_DST changes. This fixes the issue where the headers may not be written. The cause is that Rust dependencies are cached, and if your editor is using rust-analyzer, it might cache the build without this var being set, so these headers are not available to Suricata. This crate update forces the re-run of the Lua build.rs if this env var changes, fixing this issue.
- Loading branch information