What do you all use Rust for?
Currently it's my language of choice for pretty much any serious coding project, and so far I've been using it mostly for web development.
I used it at work for a big database cluster, and for all my fun projects, which include a children's paint/animation program for my daughter, a program for voice control of a computer, a few web apps, and more.
Web server, Web Socket Server, applications on embedded systems (Jetson Nano, Raspberry Pi and smaller machines), web services that demand high throughput and low latency. Basically anything I might have done in C++ or C previously. That is anything but throw away programs or stuff that lives in the browser.
your preferred web framework Rocket or actix web😁
Sounds like an amazing project
Web development is easier with Spring Boot, why choose rust for web development?
As one who is currently supporting the project on Spring Boot, I'd not agree.
There are a lot (and I mean it, really a lot) cases when I miss Rust compile-time guarantees. I won't even mention the NPEs (that's obvious), but there are some moments like "will this dependency injection work correctly?" (which is not known until runtime), or "are these two types the same, when I call
.equals(), or is it essentially unconditionally
false?" (whereas in Rust, if types are different, the attempt to test them for equality won't compile).
I think quite a few people in here would say the opposite
The OP mentioned working on small devices, and Java applications aren't known for being efficient with their memory usage. Using native, statically compiled binaries also makes installation and upgrades a lot simpler.
I do a lot of work professionally with WebAssembly and binding to C libraries or making a Rust library accessible to multiple other languages.
Almost all my side projects are in Rust, too. At the moment I'm writing a bytecode compiler + VM for the OpenSCAD programming language and have created a couple Discord bots that me and some friends use (we've got some really ergonomic libraries for Discord bots!).
I have professional experience with a lot of programming languages, and Rust feels the best suited for all the above applications. Go would be a good alternative if I wanted performance and robustness, or if my team consisted of newer programmers with no Rust experience, but the weaker type system and presence of a GC always makes me feel like I'm working with one arm tied behind my back.
Actually Rust is my most preferable language.
I use it on my pet projects, one of them: GitHub - idewave/idewave-cli: Rust implementation of world of warcraft client v3.3.5a (smart CLI)
Here are a couple of things I used Rust for, both professionally and in side projects:
- I re-wrote some numerically heavy signal processing and machine learning code to make it faster than its Python prototype, and to make it run inside the browser via WASM.
- I wrote a preprocessing and compression tool for big whole-genome sequence files to spare storage space on our bioinformatics servers and AWS accounts
- I created a parser generator library that turns source code directly into AST nodes and vice versa, without needing to perform any manual mapping.
- I am using this parser generator for implementing a type-safe, rich DSL for database management, ORM++ style.
I used it for the first time to control WS2812 leds from Raspberry Pi, to make a clock:
(Sorry, it always looks bad on photos, it really does look nicer in reality Green is hours hand, yellow is minutes hand.)
Ruby that I tried using before was too slow for that (they are controlled using a very high frequency signal which is generated by the PWM peripherals, and the Ruby library that I used was too slow to push data to the buffer of the PWM peripheral). I hate C++ so I decided to teach myself Rust, which went pretty well. I used it later for some more programs on Raspberry Pi.
I picked up Rust to see what's it about and made some tools to work with very large files for my projects
I am learning to code again. Started out way back on assembler, PL1, Cobol and Borland Turbo C.
That was (gasp!) 40 years ago!
Rust is just plain fun.
It is also so very capable and usable over a wide range of coding. I plan to dev a client/activity tracking app. So, learning and loving it. My best regards to the original Rustaceans.
Rust is just plain amazing. Never a dull moment and the forum is superb.
At home: Most of my personal web sites are now built with Zola. And most recent personal projects are built with Rust.
What does Zola do?
Zola is a lightning-fast static site generator written in Rust.
Basically: It will flow Markdown into templates that you provide (or you can find some online) and spit out a web site very quickly.
Combine that with a static site hosting specialist such as Netlify and you've got a really nice (albeit geeky) way to publish a web site.
As an example (a site of mine):
From this source on GitHub, I publish 146parks.blog about my effort to visit all of the state parks in my home state. I've been publishing this way for about a year and I'm super happy with how it works.
(I'm anxious to replace a my few remaining Jekyll-based sites with Zola, but … time …)
Rust has not been used in any of my projects yet. Actually my original goal for learning Rust is to study the source code of TiKV, however I found Rust is really special and chanllenging in the process. Hope to use Rust on making contributions to TiKV and other open source projects!
Hadn't heard of TiKV so looked it up out of curiosity. It has the most terrifying Cargo.toml I've seen (admittedly my Rust is distinctly elementary). Kudos to your courage diving into that codebase!
TiKV is the under layer of TiDB(maybe more widely heard of?).
Anyway, the fundamental motivation for me is to learn the distributed storage and transaction mechanism inside a NewSQL database. Any better example project recommonded is appreciated, thanks.