Live data from Hacker News

Rust Cryptography Should Be Written in Rust

briansmith.org

11–20 of 110 posts

Re: Rust Cryptography Should Be Written in Rust

#12
post #3
post #2

So far the only solid use case for Rust that I have seen in applications where security is extremely important. Not wonder it is becoming the de-facto language for building applications in the blockchain space. Does anyone else use Rust outside the blockchain/cryptography space? What are you working on?

> So far the only solid use case for Rust that I have seen in applications where security is extremely important. Playing devil's advocate, when is security not extremely important, except maybe in throwaway bash script-type applications?

* Toy one-off scripts, not even shell scripts necessarily

* Small things for one's personal use or local network use only

* Quickly prototyped experiments, as long as they're not used in production

Re: Rust Cryptography Should Be Written in Rust

#13
post #2

So far the only solid use case for Rust that I have seen in applications where security is extremely important. Not wonder it is becoming the de-facto language for building applications in the blockchain space. Does anyone else use Rust outside the blockchain/cryptography space? What are you working on?

It's become rather popular in the graphics (e.g. https://wgpu.rs/) and game dev (e.g. https://bevyengine.org/ ) spaces.

It's pretty popular for AWS Lambda functions.

Pretty popular for terminal / shell applications.

Definitely a great way to write wasm for compute or graphics intensive browser/web apps.

Re: Rust Cryptography Should Be Written in Rust

#14
post #12
post #3

Earlier quoted context omitted.

> So far the only solid use case for Rust that I have seen in applications where security is extremely important. Playing devil's advocate, when is security not extremely important, except maybe in throwaway bash script-type applications?

* Toy one-off scripts, not even shell scripts necessarily * Small things for one's personal use or local network use only * Quickly prototyped experiments, as long as they're not used in production

* academic/scientific research

Re: Rust Cryptography Should Be Written in Rust

#15
post #2

So far the only solid use case for Rust that I have seen in applications where security is extremely important. Not wonder it is becoming the de-facto language for building applications in the blockchain space. Does anyone else use Rust outside the blockchain/cryptography space? What are you working on?

I use it for one off stuff I used to use Ruby for at the hobby level. The learning curve was high but it is very easy to reason about correctness.

Re: Rust Cryptography Should Be Written in Rust

#16
post #6

Security is a weak-link problem. Once you decide to solve the bootstrapping challenge, you can use Rust for everything else.

Once we've used Rust for everything else, we can solve the bootstrapping challenge.

You tend to the large bleeds before the small theoretical ones.

Re: Rust Cryptography Should Be Written in Rust

#17
post #2

So far the only solid use case for Rust that I have seen in applications where security is extremely important. Not wonder it is becoming the de-facto language for building applications in the blockchain space. Does anyone else use Rust outside the blockchain/cryptography space? What are you working on?

All of our core code is Rust and even in web backend and k8s tooling at http://www.ditto.live

Been a great choice even with trade offs like needing to train some hires and compilation speeds.

Re: Rust Cryptography Should Be Written in Rust

#18
post #2

So far the only solid use case for Rust that I have seen in applications where security is extremely important. Not wonder it is becoming the de-facto language for building applications in the blockchain space. Does anyone else use Rust outside the blockchain/cryptography space? What are you working on?

[deleted]

Re: Rust Cryptography Should Be Written in Rust

#19
post #2

So far the only solid use case for Rust that I have seen in applications where security is extremely important. Not wonder it is becoming the de-facto language for building applications in the blockchain space. Does anyone else use Rust outside the blockchain/cryptography space? What are you working on?

> Does anyone else use Rust outside the blockchain/cryptography space?

Cross-platform desktop app development, systems programming and authorization which is still cryptography related, I guess.

Re: Rust Cryptography Should Be Written in Rust

#20
post #2

So far the only solid use case for Rust that I have seen in applications where security is extremely important. Not wonder it is becoming the de-facto language for building applications in the blockchain space. Does anyone else use Rust outside the blockchain/cryptography space? What are you working on?

At my $BIGCORP, we have a multi-mode (discrete/continuous) simulation engine written in Rust. It has to be extremely fast, and interface with both firmware written in C, and scripts written in Python. C++ was the only other viable option, but none of us were confident writing safe and performant C++, so we picked rust instead.

Now that I've been using rust for ~5 years, I reach for rust for when I have to do almost anything else. I write small backend services in rust[1], and small utilities that would previously have been python scripts[2]. The only thing I still use any other language for is python for writing test scripts + interactive data exploration, and typescript for front end stuff. We still use a lot of C for firmware because the Rust target support isn't as good as C yet.

[1] you might argue that Go might be better suited for this, but I disagree. The lack of null safety and less strict typing would come back to bite me a lot. A typical backend service we write is 10x simpler than our simulation engine so 1) compile times are approx the same as the project is small and 2) we usually don't care that much about performance for these services so we can just clone or RC away any problems we might have with the borrow checker. Swift might be a nice, but the ecosystem isn't there for backend apps last time I looked.

[2] Total LoC for small scripts ends up being about the same for python/rust in my experience. Development time is approx the same, but I much prefer maintaining small rust apps when I come back to it after 6 months. You _can_ set up safe and maintainable python projects with external libraries for validation, but its too much effort when rust has it all out of the box. Also, python deployment/venv management is still immensely frustrating

Post reply on HN