logoalt Hacker News

fpolingtoday at 9:03 AM3 repliesview on HN

With Go basic stuff like url parsing or HTTPS support is written in Go and comes with the standard library. With Rust too many necessary things are just wrappers around C and C++ making cross-compilation and reproducible builds much harder to archive.

As for availability if CGO is ok, then calling C or C++ code from Go is not that hard. Also, there is always an option to just start C++ process if extra data copies are OK.


Replies

afdbcreidtoday at 8:34 PM

Can you point out something that has a native Go library but not a native Rust counterpart?

The only thing I can think of is cryptography. We do have ring, but the default in rustls today is aws-lc-rs.

physicsguytoday at 2:18 PM

C APIs are much more annoying to wrap in Go than in Rust because of lack of enums (important) and unions (less important).

hota_mazitoday at 2:50 PM

Nonsense, Rust has plenty of native libraries for HTTP and JSON.