3 ms·
Rust excels at giving you fine-grain control over how your code runs. This was important to me recently, when I found I couldn't prevent Go from using threads:
by jf 8y ago
Rust excels at giving you fine-grain control over how your code runs. This was important to me recently, when I found I couldn't prevent Go from using threads:
I recently wrote the same UNIX PAM module in Go, Python, and Rust. I started with Go because I enjoy writing Go and the Go compiler can generate shared libraries. Go didn't work out because Go's use of threads resulted difficult-to-debug conflicts with the use of fork(2) in sshd - after realizing that the issue was related to threading, I found that you can write PAM modules using the excellent pam-python [1] package. The code I wrote in Python worked great, but I really wanted to generate a module as a stand-alone shared object binary, so I re-wrote the code using Rust, which worked great.
Footnote:
1: http://pam-python.sourceforge.net/ http://pam-python.sourceforge.net/
- Daviey 8y agoWhat did the modules do? Would you be willing to open source it? (Curious to see how the implementation between the 3 differs, even if the go one is non-functional)