What are you building with Rust?

Are you using Rust at work? Hobby projects?

Why did you choose Rust for your project?

  • BrucePotality@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    22
    ·
    edit-2
    10 months ago

    Just side projects building web severs for fun and to learn more about rust.

    I have lovingly called my new tech stack SHART

    -SQLX -HTMX -ASKAMA -RUST -TOKIO

  • peanutbutter_gas@lemm.ee
    link
    fedilink
    arrow-up
    11
    ·
    10 months ago

    I’ve mostly done hobby projects with rust.

    • axum + mongodb + oauth2 (just basic rest api)

    • rust-bert ( for some nlp stuff. Zero-shot, NER, etc.)

    • Bevy ( I was following a tutorial for a super basic space invaders game)

    I chose rust because I always like to have some kind of systems level programming language on my belt. It used to be c++. Rust had seemed very interesting so I began trying it out more and more. It’s awesome.

  • sugar_in_your_tea@sh.itjust.works
    link
    fedilink
    arrow-up
    10
    ·
    edit-2
    10 months ago

    I mostly use it for hobby projects. For example:

    • lemmy alternative - I’m using Iroh and Tauri to create a distributed lemmy-like application (mostly wanted an excuse to play with async Rust)
    • Godot game projects - GDScript for most things, Rust for more intense processing - not a fan of C++, and everything else is similarly awkward, so picked Rust because I like it
    • small web projects - I built a game server that did interesting things with different socket types (websockets, TCP, and UDP); wanted correctness since I’m doing a lot of async stuff; I’ve used Go for this kind of thing in the past, but I don’t like some of the footguns it has

    I’d love to use it at work, but my team is mostly Python-centric and it’s working well enough for us.

  • kevincox@lemmy.ml
    link
    fedilink
    arrow-up
    8
    ·
    10 months ago

    Everything basically.

    • Ricochet Robots solver.
    • A CLI tool to add timestamps and time since last log annotations when watching logs in a terminal.
    • A few random games.
    • RSS to Email service.
    • Making a CRDT library that embeds well in programs.
    • A tool for uploading journald log files to log aggregation services.
    • Some machine learning experiments.
    • A tiny library to implement rate limits.
  • anti-idpol action@programming.dev
    link
    fedilink
    arrow-up
    6
    ·
    10 months ago

    attempting to build a database normalization checker up to 4NF. Also forking some Spotify client and modifying it to work with the Soulseek network has been in my bucket list for a long time

  • calcopiritus@lemmy.world
    link
    fedilink
    arrow-up
    6
    ·
    10 months ago

    I’m doing mostly hobby graphics stuff with wgpu

    My latest project is a live visualizer of wgsl shaders.

    I chose rust because it’s the only language that meets all these points:

    • Compiled (which implies it will be fast and native)
    • no GCC (which means it will be faster if used correctly)
    • it’s not a pain to work with (unlike C and C++). The IDE is great and simple, the build tools (cargo) are great and simple, static linking by default (no missing .dll/.so errors)
    • Fast development times. Runtime errors are very limited, so you go slow (addressing the very common compiler errors) so you can go fast (very little debugging in comparison with other languages).
    • enums. Rust’s type system is great, specially the enums and pattern matching.
    • static and explicit typing: no surprises, everything is in the function header.
    • inmutable values by default: mutable values are explicitly stated as so.
      • calcopiritus@lemmy.world
        link
        fedilink
        arrow-up
        5
        ·
        10 months ago

        I misspelled. I meant the IDE support is great. I use VSCode, but what makes it good is Rust’s language server (rust-analyzer), which should work in any editor that understands the LSP protocol.

        I don’t know if a proper IDE exists for rust, but I’ve never needed it.

        • soulsource@discuss.tchncs.de
          link
          fedilink
          arrow-up
          3
          ·
          10 months ago

          Visual Studio Code with rust-analyzer has all the features I would expect from an IDE. I mean, rust-analyzer works together with cargo, so refactoring over file boundaries is not an issue. Visual Studio Code has built-in support for debugging and source control…

          That said, I am currently trying to change my workflow to use vim instead of Visual Studio Code, due to my laptop’s small screen size. Rust-analyzer works great in vim too, but I still need to tweak a few things, like how warnings from cargo check are being displayed…

  • 2xsaiko@discuss.tchncs.de
    link
    fedilink
    arrow-up
    6
    ·
    10 months ago

    Currently writing a distributed file system that if all goes well, can replace my current Nextcloud (which annoyed me one too many times) and NFS (which is unusable over the internet).

  • bluGill@kbin.social
    link
    fedilink
    arrow-up
    5
    ·
    10 months ago

    Crying over some C code I have to work with. I’m supposed to do a quick proof of concept but with all data passed by global variable.

  • filtoid@lemmy.ml
    link
    fedilink
    arrow-up
    5
    ·
    edit-2
    10 months ago

    I wanted to learn and I do that best by making games (find it holds my attention), found it a mixed bag, in that Bevy is quickly becoming the de-facto game engine in Rust (I know not strictly true but it is very popular), however that involves learning Bevy, rather than Rust.

    So instead recently I’ve started making games with Yew (Web lib, using WASM) and Warp, to get to grips with those. I’ve been doing a game dev live stream too, where I work on a project (FOSS) to try and show the stuff I learned. Mostly just for the enjoyment of solving maths problems with an audience!

    Sadly when I was laid off last year I couldn’t find anything in Rust but I’m hoping my next contract might involve at least some.

  • snaggen@programming.dev
    link
    fedilink
    arrow-up
    5
    ·
    10 months ago

    My use for rust at work have been to avoid C when using third party libraries. Rust bindgen is very nice to use. This way I get to use a modern language instead of C. Also replaced some java for a performance critical media monitor and xfer engine. On my spare time I have been doing some minor hacking for fun on Cosmic Term

  • tuto@lemmy.world
    link
    fedilink
    brezhoneg
    arrow-up
    4
    ·
    10 months ago

    I’m doing Game Dev with Rust (Godot + gdext in my case). Sadly it’s just hobby projects, but would love to actually use rust (at all) at work.

    I choose Rust over other languages (C#, Python, GDScript, C++, etc), because I enjoy writing in Rust.

    I love that it’s so concise and easy to read, while providing super useful errors at compile time, and great auto-completion thanks to the rust-analyzer. Despite it being a much more complicated languages than almost even C++, it provides so much useful information when writing/compiling, that running can be mostly taken for granted (but shouldn’t of course).

    I don’t need to worry about types or pointers, but rather about writing what I want in Rust, which is simply too much fun.

  • ProtonBadger@lemmy.ca
    link
    fedilink
    arrow-up
    4
    ·
    10 months ago

    I did a hobby project, a cross platform app controlling WeMo smart switches. Due to using FLTK_rs it works on Windows, Linux and macOS. Was amazed how quickly the code works after compiling. A lot of time is saved in development due to less debugging.

  • soulsource@discuss.tchncs.de
    link
    fedilink
    arrow-up
    4
    ·
    10 months ago

    I’m mostly using Rust for a spare time Visual Novel Engine (and Visual Novel) project.

    I picked Rust, because I wanted to do something productive with my higher-free-macro crate (which is a tech-demo, but hey, if I have written it, I can just as well use it for something). If you want to get an idea how scripting the VNs in that engine will work, check out the “text adventure” example in higher-free-macro. However, Rust is definitely not an ideal choice for this project. Since performance usually isn’t a concern for visual novels, a higher-level, pure functional language like Haskell or Lean4 would probably have been a better option.

    Apart from that I’m using it for many smaller things. For instance I’ve written a small tool for my status bar, swaystatus. (I was not aware that i3status-rust exists when I started working on it, and now I am already committed.) Here I chose Rust mainly because I wanted to learn about Foreign Function Interface in Rust. While I didn’t upload the sources to github until recently, I mostly had been working on this tool several years ago, when I still was a Rust newbie. However, I got back to this project some weeks ago, when I realized that I would like to have an ALSA volume display, which is now in a WIP state on a separte branch.

    I’m also using Rust for some out-of-tree prototypes at work. In this case the main reason for choosing Rust is development speed. I’m using Iced.rs to build those prototype GUIs, and Iced is an amazing toolkit. Making a prototype with it is shockingly fast. If I were to do something similar with basically any other GUI toolkit, it would take me significantly longer.

    And last, but not least: I’ve published a free app for SailfishOS which is compatible with passwordmaker.org: Passfish, and its underlying library, passwordmaker-rs. Here I chose Rust, because it’s way less error prone than C++ (and let’s better not talk about QML JavaScript). Also, I wanted to show that using Rust for SailfishOS app development is viable, and that it’s actually a quite pleasant experience. (If you want to try passfish, builds are available via the official SailfishOS store, or on OpenRepos).