What are you building with Rust?

Are you using Rust at work? Hobby projects?

Why did you choose Rust for your project?

  • @[email protected]
    link
    fedilink
    64 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.
      • @[email protected]
        link
        fedilink
        54 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.

        • @[email protected]
          link
          fedilink
          34 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…

          • @[email protected]
            link
            fedilink
            24 months ago

            I highly recommend the vscode extension error lens if you wanna change how errors/warnings are displayed.