Feature #2507
closed
Added by Jason Ish over 6 years ago.
Updated over 5 years ago.
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 |
|
Ubuntu |
14.04 |
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 |
- Description updated (diff)
- 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?
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.
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?
- Description updated (diff)
- Description updated (diff)
- Related to Task #2629: tracking: Rust 2018 edition added
- Description updated (diff)
- Description updated (diff)
- Target version changed from TBD to 5.0beta1
- Description updated (diff)
- Description updated (diff)
- Description updated (diff)
Updating the Fedora version to 28+ as 27 is EOL at the end of November.
- Description updated (diff)
Looks like Debian 9 contains cargo now, and Rust 1.24.1.
- Description updated (diff)
Looks like Rust is now in Ubuntu 14.04.
- Description updated (diff)
- Description updated (diff)
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.
- Description updated (diff)
I agree we can ignore Ubuntu 14.04 is a EOL date that close.
- Description updated (diff)
- Description updated (diff)
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".
Great news Sascha, thanks for your work on that!
- Status changed from New to Assigned
- Assignee changed from OISF Dev to Jason Ish
Victor Julien wrote:
Can you take this Jason?
Yes. I assume you mean by requiring it as part of ./configure?
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
- Description updated (diff)
- Description updated (diff)
Ubuntu 14.04, 16.04 and 18.04 all now have rustc 1.31 which supports edition 2018.
- Description updated (diff)
FreeBSD 11 and 12 now have Rust >= 1.31.
- Description updated (diff)
- Status changed from Assigned to Resolved
- Effort deleted (
medium)
- Difficulty deleted (
low)
- Status changed from Resolved to Closed
Also available in: Atom
PDF