Hacker News new | ask | show | jobs
by woah 1490 days ago
Maybe it’s because crypto actually needs the advanced features and correctness that Rust provides, while language doesn’t matter for most of your basic CRUD jobs so people use JS or whatever
3 comments

doesn't seem like Rust is a silver bullet for preventing crypto hacks
(Ethereum) Smart Contracts are usually written in Solidity, not Rust...
Solana uses Rust/C++ to compile to an ebpf target, fwiw.
Is it a hack if the contract programmatically allows you to do it?

Or is it a hack if you didn't understand the scope of your contract as you wrote it, and are now upset someone executed on it in a way you didn't expect?

If you choose to go through the effort, Haskell can be shown to be provably correct -- that is in a mathematical sense of the term "prove" -- similar to Ada/SPARK.

https://stackoverflow.com/questions/4077970/can-haskell-func...

AIUI, similar work is being made to Rust to make it have similar provable properties.

Thing is, in Rust, you can't choose not to go through the effort. The borrow checker forces you to do so.
crypto gets hacked much too often to pretend that pointer safety somehow does something useful for them