Make Rust mandatory
More and more new features are being done in Rust and eventually it will only make sense to have Rust has a mandatory requirement. The requiring Rust has no impact on the usage of end-users it does affect those building from source which includes end-users and package builders. The purpose of this issue to track feedback on making Rust a requirement, as well as recording what operating systems and Linux distributions are able to support the Rust requirement.
As Rust is a young language it is still in a state change, and just having Rust installed might not be enough. There are requirements for minimum versions, by us, as well as Rust libraries Suricata depends on.
At this time the minimum Rust version required to build Suricata is 1.21.0. In addition Rust, Cargo, the Rust package manager is also required.
|CentOS||6||--||No||Rust can be install manually|
||1.30.0||Yes||Will be EOL before Suricata 5|
|FreeBSD||11.2||1.30.0||Yes||pkg install rustc cargo|
|FreeBSD||12.0||1.30.0||Yes||pkg install rustc cargo|
|OpenBSD||??||??||Rust is in ports|
|MinGW||??||1.29.2||??||Can be installed through pacman|
Updated by Sascha Steinbiss 9 months ago
Andreas Herz wrote:
Is there a good way to get it running on Debian 9 somehow?
If it's just about OISF providing a .deb to install on Debian stretch, then there's a way to make that work. I have successfully built a .deb for stretch using vendored Rust code and using the cargo package from Debian testing as a dependency. However, this is a workaround and only possible with full control over the package building setup.
If you want 4.1 with Rust support as a package in the official Debian stretch (FYI that would mean via stretch-backports), one would need to backport a newer Rust and cargo to stretch. I've mentioned this on IRC to the Debian Rust team (https://wiki.debian.org/Teams/RustPackaging) but they explicitly said this was not a priority at the moment as I understand they are quite understaffed. TBH doing that backport is also a bit over my head as building cargo needs an earlier version of cargo, so one would need to get their head around the required bootstrapping to do that.
Updated by Danny Browning about 2 months ago
The first cargo/rustc version that will work correctly with `cargo fix --edition` (e.g. both 2015 and 2018 editions) is 1.30.0. This allows libraries that target 2018 to be used in suricata.
Centos7 looks to be at 1.31.0 now: https://centos.pkgs.org/7/epel-x86_64/rust-1.31.0-8.el7.x86_64.rpm.html
Ubuntu 14.04 is EOL in April. Should we exclude it from this list?
That leaves Debian 9 which is working on upgrading to 1.31.0.