5 ms·
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
by max_ 3y ago
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?
- tines 3y ago> 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?
- ronsor 3y ago* 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
- cshimmin 3y ago* academic/scientific research
- TillE 3y agoGames. The attack surface for third-party input is very limited, and you can just secure those bits rather than adopting a new language for the entire program. Like, you need to be able to sandbox mods if they're a thing, and Rust's memory safety only handles a tiny part of that.
- riku_iki 3y agothere are some data processing projects, www.pola.rs for example
- andrew_shay 3y agoI use it for a desktop file transfer app [0]. I chose Rust because my primary language is Python and I just wanted to learn something new and really different for this project. Go would have been easier, but Rust just feels bullet proof. It's so strict. If it compiles, it works! It's been a very interesting journey. [0] https://github.com/transmitic/transmitic https://github.com/transmitic/transmitic
- jasonjmcghee 3y agoIt's become rather popular in the graphics (e.g. https://wgpu.rs/ https://wgpu.rs/) and game dev (e.g. https://bevyengine.org/ 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.
- throwawa14223 3y agoI 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.
- bigfish24 3y agoAll of our core code is Rust and even in web backend and k8s tooling at http://www.ditto.live http://www.ditto.live Been a great choice even with trade offs like needing to train some hires and compilation speeds.
- deleted 3y ago[deleted]
- heavyset_go 3y ago> 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.
- potatochup 3y agoAt 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
- SeanAnderson 3y agoI'm building a 2D simulation game compiled to WASM using Bevy! It's nicer writing in Rust than JS, no GC makes Rust a good WASM candidate, theoretically the performance can be better if you're careful, people take 2D game engines more seriously in lower level languages, and it keeps the door open for shipping on Steam later. I've found it much slower to develop in, though. Compilation times are an issue and after working in JS for decades I realize how big the JS ecosystem is compared to something like Rust. I doubt the decision was a good choice overall in terms of trying to ship an MVP, but it might still pay dividends for a finished product, if the game gets there, due to having a higher cap on performance
- adwn 3y agoFor our client, we've developed a desktop application in Rust – with a thin GUI frontend in C++/Qt – to filter, process, and visualize sensor data streams (3D point cloud data from a Lidar). Each data stream was about 400-500 Mbit/s in 55k UDP packets per second, with support for at least 4 simultaneous streams. The focus was on high performance and development speed, security didn't matter at all. We chose Rust for its unique position in the performance/productivity tradeoff space, and didn't regret it even for a second. There's no way we could have pulled this off with C++ in the same time, especially the bug-free parallelization.
- jenadine 3y agoWhy use C++ for the front-end though?
- adwn 3y agoWe selected Qt as a cross-platform solution. The C++/Rust interface is the clunkiest and ugliest part of the application, and rather complex because some state is shared between several windows in the GUI and several threads in the backend, and any component might modify that state at any time, and updates have to be transmitted to the other components without introducing inconsistencies. However, using cxx [1] helped a little. The project began in 2020, and I'm not sure what I'd choose as a GUI framework today – definitely not Qt Widgets, though. [1] https://cxx.rs/ https://cxx.rs/
- agsgs 3y ago[dead]
- deleted 3y ago[deleted]
- IshKebab 3y agoRust is just a nice general purpose language. It's good more or less everywhere. There are a few places where I wouldn't recommend it - for beginners, when compile time is really important (e.g. as a scripting engine in games), or where you need a repl (science). But otherwise it's a better choice than most languages for most tasks.
- School-Cotton 3y ago> Does anyone else use Rust outside the blockchain/cryptography space? What are you working on? I work at Materialize which is building database software in Rust. One of my coworkers blogged about our experience with the language here: https://materialize.com/blog/our-experience-with-rust/ https://materialize.com/blog/our-experience-with-rust/
- gochi 3y agoDefect language in the blockchain space is still JS/TS. Not sure you should be relying on their signals for security assurances.
- max_ 3y agoI am talking about building nodes that execute the underlying consensus protocols. Not the front end client side applications.
- olix0r 3y agoLinkerd's sidecar proxy (https://github.com/linkerd/linkerd2-proxy https://github.com/linkerd/linkerd2-proxy) is implemented in Rust. It implements transparent mTLS, HTTP load balancing, telemetry, etc. Rust gives us safety and security with a minimal resource footprint.
- junon 3y agoYes, in fact I see hardly any cryptocurrency stuff with rust. I'm building an OS in rust, and write most firmware with rust too.
- rvz 3y ago> Yes, in fact I see hardly any cryptocurrency stuff with rust. Really? Solana [0] a top 10 market cap cryptocurrency is written in Rust and so is its smart contracts. NEAR Protocol is another [1] one as well as Sui [2] and Polkadot [3] written and using Rust. [0] https://github.com/solana-labs/solana https://github.com/solana-labs/solana [1] https://github.com/near/nearcore https://github.com/near/nearcore [2] https://github.com/MystenLabs/sui https://github.com/MystenLabs/sui [3] https://github.com/paritytech/polkadot-sdk https://github.com/paritytech/polkadot-sdk
- junon 3y agoI didn't say it didn't exist. I said I don't personally ever see any cryptocurrency stuff in my Rust experience aside from coming across a few crates here or there related to it.
- petesergeant 3y agoAs an outsider with some good feelings towards Rust and some negative one towards crypto, almost all Rust jobs I’ve seen have been in crypto
- junon 3y agoThat's a fair point, my experience as well. I think I was mostly talking about the code I see on e.g. GitHub.
- brigadier132 3y agoIm using it for a highly multithreaded real time web app. Also i disagree with your assessment, i think rust can really be used for everything. For the business im building the frontend is written in js but everything on the backend is rust. i needed one highly multithreaded realtime server and rust was the right choice for that. For everything else (api, file server) I decided to just use rust too, maintaining a node backend and a rust backend and having to deal with typescript build systems when i could just use rust for everything made my life easier. What ive found is that open source authors interested in releasing libraries in python and nodejs choose to write it once in rust then release python and js libraries using rust ffi. See polars, yrs, rapierjs, lancedb, candle, etc.
- bsder 3y ago> So far the only solid use case for Rust that I have seen in applications where security is extremely important. But that's basically anything that touches the internet. Not having buffer overflow vulnerabilities in your communications code is huge.
- xedrac 3y agoI've used Rust for years in embedded Linux devices and more recently in signal processing.
- pjmlp 3y agoOnly hobby coding, leetcode stuff and such. Work is all about Java, .NET, Web and mobile OSes, Rust hardly brings anything to the table there, other than less capable tooling, higher attrition with existing ecosystem and complexity in designing borrow checker friendly algorithms versus automatic memory management.