this post was submitted on 26 Feb 2024
48 points (98.0% liked)

Rust

5980 readers
178 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

[email protected]

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 1 year ago
MODERATORS
 

What are you building with Rust?

Are you using Rust at work? Hobby projects?

Why did you choose Rust for your project?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 6 points 8 months ago (1 children)

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] 1 points 8 months ago (1 children)
[–] [email protected] 5 points 8 months ago (1 children)

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] 3 points 8 months ago (1 children)

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] 2 points 8 months ago

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