top | item 16254906

C vs. Rust vs. Go for IDS

2 points| splithorizon | 8 years ago | reply

I have spent a lot of time writing network tools with Python's scapy module, which I love. I prototyped an Intrusion Detection System using scapy, inspired by Snort, but know it will not be able to process a large amount of packets and want to start programming with a faster, more powerful language.

My issues are:

-C seems like the best option speed-wise but there is very little documentation for doing certain things, like IPv6, for example. -I can't get a straight answer out of anyone for whether to choose Go over Rust, or vice-versa.

My question is, if I want to write programs that process, parse, and classify a large amount of packets, which of the three languages would you suggest learning?

1 comment

order
[+] thatinstant|8 years ago|reply
There are several blog posts out there on the Go vs Rust debate and how both languages are not really in the same boxing weight class, so to speak, but people tend to compare and contrast the two languages more often because they both launched around the same time. With that said, I'll take a crack at this question... Without having to define what "large amount" means to you or others, I would guess you want to pick Rust. Go uses a runtime to perform garbage collection; while Rust is not runtime-based (no garbage collection), and manages memory with zero-cost abstractions and a very strict compilation process. So, if you're turned off by your applications being attached at the hip to a garbage collector that will cost precious milliseconds, then Rust is a better choice. It's also a better choice for having more advanced language features than Go. Rust is a LLVM-based language so I believe Rust can target more platforms than Go, but Go has a better story for easier cross-compilation right now. However, one of the Rust team's goals for 2018 will be focusing on easier cross-compilation.