12 ms·
I haven't started playing around with Rust yet, but I'm interested in it. If you're using Rust -- tell me, what are you building in it? And what do you love ab
by provost 9y ago
I haven't started playing around with Rust yet, but I'm interested in it.
If you're using Rust -- tell me, what are you building in it? And what do you love about Rust in your experience while building it? (Get me excited)
- steveklabnik 9y agoOne related thing that might be of an interest to you is to check out https://www.rust-lang.org/en-US/friends.html https://www.rust-lang.org/en-US/friends.html ; many of our production users have linked blog posts explaining more details about what they're doing.
- oconnor663 9y agoYou could check out this comment thread, about what gets people excited :) https://www.reddit.com/r/rust/comments/7kjnu7/hey_rustaceans_got_an_easy_question_ask_here/drixuw9/ https://www.reddit.com/r/rust/comments/7kjnu7/hey_rustaceans...
- jack6e 9y agoThe fabled RESF home base.
- andrewflnr 9y agoYou’re thinking of reddit.com/r/rustjerk
- 0b01 9y agoI built a order book data storage in Rust. It's kind of like redis but for order book data. I can't imagine writing such a complex piece of software in any other language in such a short time (2 months). https://github.com/rickyhan/tectonicdb https://github.com/rickyhan/tectonicdb
- arianvanp 9y agoI'm building a realtime path tracer using http://vulkano.rs/ http://vulkano.rs/ It's the best Vulkan library I've seen so far (Though the C++ one is pretty good as well). It will preprocess your shaders and generate rust structs that are guarenteed to be the same alignment as the structs in your shaders, which is very nice. They also use a future-based API (a la tokio) such that I don't have to deal with fences and semaphores and whatnot myself. The future simply resolves as soon as the GPU is done doing work. It's an amazing abstraction, and really makes you think of your GPU as an asynchronous machine, instead of the openGL hacks that try to hide that from you.
- Q6T46nT668w6i3m 9y agoI’ve written a few compiler-related libraries in the past few years for a DSL (e.g. a few LLVM optimization passes and a type checker). I love two things about Rust: it’s easy to integrate into existing C and C++ projects and it’s super easy to build and compile (including dependencies). I dislike a lot of stuff about Rust like the noisy (Perl-like) syntax and strange (and enforced) style rules (Arm not ARM), but they are mostly the type of annoyances you’d encounter with anything you really like.
- Q6T46nT668w6i3m 9y agoI forgot to mention another amazing feature: documentation. Rust has speculatcular documentation for beginning, intermediate, and advanced users. Likewise, Rust manages their community so you always know where to look for help (like the managed forums).
- fasquoika 9y ago> like the noisy (Perl-like) syntax I agree that Rust can be pretty noisy in some cases, but I've never really thought of it as Perl-like. Perl's syntax has so much noise so that the language can be enormous whereas Rust is at its core a pretty simple language. Rust code tends to be noisy because it includes a lot of information that you might not care about at the moment
- tmzt 9y agoMight you be referencing the sigils (@ and ~), because thry've been gone for a few years now. The syntax is light and clean, eschewing redundencies like parens around if conditions. More lifetime inference and non-lexical lifetimes help to clean it up even more.
- kouteiheika 9y agoCompiling Rust to WebAssembly and building https://github.com/koute/stdweb https://github.com/koute/stdweb Rust is a powerful enough language where you can do crazy stuff like write inline JavaScript inside of your Rust code, and freely pass data in and out of those JS snippets, and compile the whole thing to WebAssembly.
- pohl 9y agoIt's nice that Rust has a macro facility to make this possible. It reminds me of the delightful way that Google Web Toolkit lightly abused the "native" keyword (which marks FFI methods in Java) to do inline javascript.
- topspin 9y agoIn my mind Rust macros are easily the least appreciated feature of the language. Nearly every non-trivial library I've had any contact with use macros in some manner to enhance their API and usually the result is very good. For me one of the most compelling things about Rust when I first learned of the language was print!() and how it comprehensively solves the type-safe string interpolation problem better than anything that has ever been provided in C and C++.
- deleted 9y ago[deleted]
- papaf 9y agoIf you're using Rust -- tell me, what are you building in it? And what do you love about Rust in your experience while building it? (Get me excited) I think that it is wrong to think of Rust in terms of internet popularity contests. Its mostly a frustrating and difficult language. That said, I think that Rust lives up to its hype and is one of the most important languages to come out in recent times. I am writing an SMTP server and can say without doubt, that Rust enabled a much better result than I would be capable of in any other language. I have used Ada and modern C++ in the past and I consider Rust to be an improvement. I have seen demonstrations of the language Idris that were like looking into the future. However, the larger community and good tooling make Rust a more practical option. Bearing in mind that I find Rust to be an annoying language there are things that stand out as better than average: 1. Cargo. The only build and dependency tool that has never annoyed me. 2. A very open and welcoming community. 3. Nom, a very weird parser combinator that is a joy to use when you get used to it. 4. Multithreaded programming. For old school C++ multithreading its incredible to write something and have it work first time and not find any weird threading bugs. 5. Coming back to old code is not the painful experience that it is in other languages. If you are interested in learning a C++ like language, I would recommend Rust. If you are a C++ programmer, I highly recommend learning Rust.
- bulldoa 9y agowhat kind of projects will one want to write in rust? I am going through rust right now , and I find it very difficult, simple stuff like doubly linked list or graph is not very intuitive, especially when you want to update inside rc using refcell. Any tips for newbie like me on motivation and learning?
- steveklabnik 9y agoWhat's easy and hard in Rust isn't the same as what's easy and hard in other languages. As a beginner, don't try to learn Rust by implementing data structures, as you need to know a lot of Rust to do it correctly. Here's an entire book on writing linked lists, for example: http://cglab.ca/~abeinges/blah/too-many-lists/book/ http://cglab.ca/~abeinges/blah/too-many-lists/book/ What did you do so far to learn? How do you learn other languages, and what other languages do you know?
- techwizrd 9y agoI'm using Rust to build a PGP keyserver[0]. 0: https://github.com/srct/sks-rs/ https://github.com/srct/sks-rs/
- fafhrd91 9y agoI am building async web framework with http/2 and websockets support. I think rust is great! You can write high level code, but if you need to you can always access low level system https://github.com/actix/actix-web https://github.com/actix/actix-web
- pedrocr 9y agoMy project to learn rust was a camera RAW format loader[1]. Compared to the good modern C++ codebase it's based on the end result supports the same formats, has the same performance, is only 20% of the lines of code, and is much safer to use (binary formats are rife for exploits). Doing all that took me less time than I had already spent previously fuzzing the C++ codebase and doing whack-a-mole on extremely scary exploitable bugs. For that use case it was extremely successful. The next step is to build an image pipeline and editor around it[2][3]. For that the graphics ecosystem isn't as mature as the equivalent C/C++ ones but the possibilities are also amazing. The expressiveness of the language combined with the great LLVM backend means some things like very clean ways to do SIMD/threading become just a joy to use If only I had the chance to work on this full time for a year... Help would be very much appreciated! The kinds of things that become possible and even pleasent once you remove the mental overhead of dealing with the fundamental warts of C/C++ are amazing. After this experience with rust I don't see any reason to ever write C/C++ again. [1] https://github.com/pedrocr/rawloader https://github.com/pedrocr/rawloader [2] https://github.com/pedrocr/rawloader/tree/master/src/imageops https://github.com/pedrocr/rawloader/tree/master/src/imageop... (to be spun out into its own crate) [3] https://github.com/pedrocr/chimper https://github.com/pedrocr/chimper
- vvanders 9y agoYup, that mirrors my experience working with binary wire formats and the like. There's also the added bonus that doing cross-platform code with Rust is a breeze. If you aren't depending on any C libraries you basically get it for free. I had a UI framework that was running on 5 different targets that was a joy to work with. I've done that in C/C++ before and it's a massive pain.
- ealhad 9y agoWhich framework? It have not yet done any GUI with Rust, but would gladly try.
- epage 9y agoYak shaving :) I want to write a source code spell checker with performance better than scspell. I didn't want to take that on as my learning project, so I instead started with a lint tool that is driven by user-defined regexes. But I wanted to blog about my experience learning Rust. I wanted a blog that was good with code (so I'm moving off of blogspot finally) and easy to deploy (so no Jekyll) and decided on Cobalt which is written in Rust. There are some features lacking, so I've been contributing back (and have become the primary maintainer). One year later and I've still not gotten around to my regex-based linter or source code spell checker. What gets me excited about Rust: - Cargo - Level of confidence that compiled code will work because of both the type system and the borrow checker - Zero cost abstraction (I'm weird) - Error handling that has similar ergonomics to exceptions, easier to reason about, but can work in any environment. Exceptions can't run in places like the Windows kernel, so you end up using what feels like a fork of the language + standard library. Misc notes on my experience: - Borrow checker has rarely been a problem for me. Yes, sometimes it complains but is usually right and easy to fix - I've never used the `unsafe` escape hatch The things that frustrate me are nitpicky and I recognize they will go away as the language matures: - Lack of specialization. e.g. I have a type that I want convertable from/to iterators but the trait for this has a no-op implementation for "convert from self to self", causing ambiguity that fails to compile. - Can't have a struct implement the function-trait - You can't specify that a variable should implement multiple traits (like the primary one and Debug). Instead you need to make a treat that inherits all of the traits you care about. - CI conventions have too much maintenance overhead for an ecosystem that encourages a lot of small packages. The last one is probably my next step in Yak Shaving once I get cobalt into a "good enough" state for myself.
- ivanceras 9y agoI'm building a user-friendly database interface for postgresql https://github.com/ivanceras/diwata https://github.com/ivanceras/diwata . It is a very complex application, but rust and elm helps me build it with ease.
- JackC 9y agoFor a learning project, I started messing around with the rodio library to generate realtime electronic music: https://github.com/jcushman/coolsounds https://github.com/jcushman/coolsounds As a python programmer, the part I find exciting/motivational is performance -- I can get my hands dirty writing low-level math code to dump weird sounds out to the speakers 44k times per second, accidentally wandering into interesting glitchy sounds that I don't think you would create using higher-level audio tools, and not feel limited by the speed of the language or reliance on C libraries. (Not that Rust is necessarily the best or easiest way to mess around with low-level audio generation, but it sure is a fun way to learn.)
- pornel 9y agoComing from C, I get excited by boring things in Rust: • 3rd party dependencies are easy to use (often even on Windows) and usually have no runtime overhead. • Basic unit testing is built in, so there's low friction to use it (not only for me, but across the entire ecosystem). • Result type + `?` operator is a nice compromise between clarity and flexibility of return-based error handling and low syntax noise of exceptions.
- monocasa 9y agoA full system emulator like QEMU that's built as a compiler generator. The goal is to build new interpretors and stage 1 JITs at runtime that are tailored to specific supervisor states to give good low latency performance before code hits a real big boy JIT. Targeting game consoles at the moment because of how sensitive those emulators are to latency as well as raw perf, but better a ARM Android emulator is one of the end goals.
- kpcyrd 9y agoMy most interesting projects are currently a security focused network sniffer[0] and a sandbox debugger[1] that I came up with while writing the sniffer to inspect what an attacker can and can't do assuming the process gets fully exploited while the sandbox is active. [0]: https://github.com/kpcyrd/sniffglue https://github.com/kpcyrd/sniffglue [1]: https://github.com/kpcyrd/boxxy-rs https://github.com/kpcyrd/boxxy-rs
- seawlf 9y agoI'm writing a text editor. I love it, its handling of UTF-8+ strings makes me want to bawl with the amount of time I've dumped into handling that in other contexts. The lifetimes take some getting used to but after you do, the language is a breeze and so much fun to work on.