An unofficial, read-only Hacker News reader. Join the beta →

Rvoip: VoIP stack in Rust (opens external site)

162 points by zerosegfaults 1 day ago | github.com | 39 comments on HN

View full thread · View on Hacker News

Comment thread (3)

  1. Rust has a reputation of being safe, very light and pretty damn fast, so mentioning it makes sense. I doesn't mean that the AI coded safely but it's a selling argument for many.

    [edit] golang is probably almost as good and safe but that's where religion comes into play. I personally am technology agnostic.

    Replies (2)
    1. The comparison between golang and rust comes up a lot. Golang is certainly a capable language, but I think it's not filling the same niche that rust fills.

      While golang often is comparable to rust in a lot of scenarios, there's also quite a bit of a difference between the two to make this a non-religious choice based on technical merits and needs. For starters, golang comes with a runtime and a gc. This is an absolutely fine choice in a lot of places, notably when you start writing web/desktop components from scratch. It does, however, make it impossible to use in some places where rust is usable: Very small memory/cpu constrained devices, places where you need predictable (not necessarily fastest) performance, control over allocation/deallocation and most notably, places where you want to replace one component written in C/C++ with something memory-safe. Golang brings a runtime and as such you can't just embed go code into a C binary. With rust you can, it's one of the explicit design goals of the language and drives a lot of the design choices that went into it (for example the no GC approach to memory management)

      This also explains why it's interesting to mention the language: Rust caters to a specific set of programming language needs. If I have a need for the things that rust provides, then go isn't going to be a replacement. If I want a voip stack that I can integrate into a C application because I happen to have one, then I either need C, C++ or Rust (or anything else that compiles down to a plain object file)

    2. > Rust has a reputation of being safe,

      Rust is memory safe, that fact is widely accepted – certainly our Rust friends remind us of it at any opportunity. :)

      What Rust proponents are less willing to talk about is that Rust is still as exposed as any other language to whole classes of other potential vulnerabilities and generally insecure coding practices and architectures.

      Rust is also exposed to supply-chain attacks because of the nature of Rust people end up with a completely unvetted Cargo.toml as long as their arm ... which is frankly scary in anyone's book ! Achieving "minimal reasonable dependencies" in Rust takes hard work, blood sweat and tears that most Rust developers don't do, as evidenced by their lengthy toml files.