Feature #2507
closedMake Rust mandatory
Description
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.
OS/Distribution | Version | Rust Version | Supported | Notes |
---|---|---|---|---|
CentOS | 6 | -- | No | Rust can be install manually |
CentOS | 7 | 1.31.0 | Yes | Requires EPEL |
Debian | 9 | 1.24.1 | Yes | |
Fedora | 28+ | 1.31.0 | Yes | |
|
|
1.31.0 | Yes | Will be EOL before Suricata 5 |
Ubuntu | 16.04 | 1.31.0 | Yes | |
Ubuntu | 18.04 | 1.31.0 | Yes | |
FreeBSD | 11.2 | 1.33.0 | Yes | pkg install rustc cargo |
FreeBSD | 12.0 | 1.33.0 | Yes | pkg install rustc cargo |
OpenBSD | 6.4 | 1.29.2 | Yes | Rust is in ports; next OpenBSD will have 1.33+ |
MinGW | ?? | 1.29.2 | ?? | Can be installed through pacman |
Updated by Andreas Herz over 6 years ago
- Assignee set to OISF Dev
- Target version set to TBD
- Effort set to medium
- Difficulty set to low
We should add Ubuntu 18.04 and I guess we don't need to focus on 14.04 anymore (EOL in the near future).
Is there a good way to get it running on Debian 9 somehow?
Updated by Sascha Steinbiss over 6 years 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 over 6 years ago
Rather than producing and releasing packages, what about a set of docker scripts in suricata for less well supported os's to generate a deb against latest rust?
Updated by Jason Ish about 6 years ago
- Related to Task #2629: tracking: Rust 2018 edition added
Updated by Victor Julien about 6 years ago
- Target version changed from TBD to 5.0beta1
Updated by Jason Ish almost 6 years ago
- Description updated (diff)
Updating the Fedora version to 28+ as 27 is EOL at the end of November.
Updated by Jason Ish almost 6 years ago
- Description updated (diff)
Looks like Debian 9 contains cargo now, and Rust 1.24.1.
Updated by Jason Ish almost 6 years ago
- Description updated (diff)
Looks like Rust is now in Ubuntu 14.04.
Updated by Danny Browning almost 6 years 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.
Updated by Victor Julien almost 6 years ago
- Description updated (diff)
I agree we can ignore Ubuntu 14.04 is a EOL date that close.
Updated by Sascha Steinbiss almost 6 years ago
FYI: Rustified Suricata 4.1.2 is now available in Debian stretch-backports (and will also be in buster). A cargo package has been added to stretch so we were able to build without "cheating".
Updated by Victor Julien almost 6 years ago
Great news Sascha, thanks for your work on that!
Updated by Victor Julien over 5 years ago
- Status changed from New to Assigned
- Assignee changed from OISF Dev to Jason Ish
Can you take this Jason?
Updated by Jason Ish over 5 years ago
Victor Julien wrote:
Can you take this Jason?
Yes. I assume you mean by requiring it as part of ./configure?
Updated by Victor Julien over 5 years ago
Yes indeed, and then the next step would be remove the ifdefs and duplicate C code in DNS and SMB, though that is tracked in a separate ticket #2632
Updated by Jason Ish over 5 years ago
- Description updated (diff)
Ubuntu 14.04, 16.04 and 18.04 all now have rustc 1.31 which supports edition 2018.
Updated by Jason Ish over 5 years ago
- Description updated (diff)
FreeBSD 11 and 12 now have Rust >= 1.31.
Updated by Victor Julien over 5 years ago
With https://github.com/OISF/suricata/pull/3772 merged, MinGW now works with Rust enabled as well.
Updated by Victor Julien over 5 years ago
- Status changed from Assigned to Resolved
- Effort deleted (
medium) - Difficulty deleted (
low)
Updated by Victor Julien over 5 years ago
- Status changed from Resolved to Closed