Project

General

Profile

Feature #2507

Make Rust mandatory

Added by Jason Ish about 1 year ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Effort:
Difficulty:
Label:

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

Subtasks

Optimization #2632: remove C implementations where we have Rust as wellClosedOISF DevActions
Task #2849: Remove C SMB parser.ClosedVictor JulienActions
Task #2850: Remove C DNS parsers.ClosedJason IshActions

Related issues

Related to Feature #2629: Rust2018 TrackingNewActions

History

#1

Updated by Jason Ish about 1 year ago

  • Description updated (diff)
#2

Updated by Andreas Herz about 1 year 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?

#3

Updated by Sascha Steinbiss about 1 year 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.

#4

Updated by Danny Browning about 1 year 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?

#5

Updated by Victor Julien 12 months ago

  • Description updated (diff)
#6

Updated by Victor Julien 12 months ago

  • Description updated (diff)
#7

Updated by Jason Ish 10 months ago

#8

Updated by Jason Ish 10 months ago

  • Description updated (diff)
#9

Updated by Victor Julien 10 months ago

  • Description updated (diff)
#10

Updated by Victor Julien 9 months ago

  • Target version changed from TBD to 5.0beta1
#11

Updated by Jason Ish 8 months ago

  • Description updated (diff)
#12

Updated by Jason Ish 8 months ago

  • Description updated (diff)
#13

Updated by Jason Ish 8 months ago

  • Description updated (diff)

Updating the Fedora version to 28+ as 27 is EOL at the end of November.

#14

Updated by Jason Ish 8 months ago

  • Description updated (diff)

Looks like Debian 9 contains cargo now, and Rust 1.24.1.

#15

Updated by Jason Ish 8 months ago

  • Description updated (diff)

Looks like Rust is now in Ubuntu 14.04.

#16

Updated by Victor Julien 7 months ago

  • Description updated (diff)
#17

Updated by Victor Julien 7 months ago

  • Description updated (diff)
#18

Updated by Danny Browning 7 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.

#19

Updated by Victor Julien 6 months ago

  • Description updated (diff)

I agree we can ignore Ubuntu 14.04 is a EOL date that close.

#20

Updated by Jason Ish 6 months ago

  • Description updated (diff)
#21

Updated by Jason Ish 6 months ago

  • Description updated (diff)
#22

Updated by Sascha Steinbiss 6 months 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".

#23

Updated by Victor Julien 6 months ago

Great news Sascha, thanks for your work on that!

#24

Updated by Victor Julien 5 months ago

  • Status changed from New to Assigned
  • Assignee changed from OISF Dev to Jason Ish

Can you take this Jason?

#25

Updated by Jason Ish 5 months ago

Victor Julien wrote:

Can you take this Jason?

Yes. I assume you mean by requiring it as part of ./configure?

#26

Updated by Victor Julien 5 months 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

#27

Updated by Victor Julien 4 months ago

  • Description updated (diff)
#28

Updated by Jason Ish 4 months ago

  • Description updated (diff)

Ubuntu 14.04, 16.04 and 18.04 all now have rustc 1.31 which supports edition 2018.

#29

Updated by Jason Ish 4 months ago

  • Description updated (diff)

FreeBSD 11 and 12 now have Rust >= 1.31.

#30

Updated by Jason Ish 4 months ago

  • Description updated (diff)
#31

Updated by Victor Julien 4 months ago

With https://github.com/OISF/suricata/pull/3772 merged, MinGW now works with Rust enabled as well.

#32

Updated by Victor Julien 3 months ago

  • Status changed from Assigned to Resolved
  • Effort deleted (medium)
  • Difficulty deleted (low)
#33

Updated by Victor Julien 3 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF