Our great sponsors
rustfmt | Helix | |
---|---|---|
48 | 1 | |
5,026 | 1,987 | |
1.7% | 0.0% | |
8.6 | 0.0 | |
5 days ago | over 2 years ago | |
Rust | Rust | |
Apache License 2.0 | ISC License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
rustfmt
-
What are some good practices when writing rust?
code must be formatted with rustfmt.
-
Hey Rustaceans! Got a question? Ask here (5/2023)!
Yes, some cases are not yet supported (https://github.com/rust-lang/rustfmt/issues/4914).
-
How do I stop RustFmt from turning this…
Just FYI, the let-else suggestions will only work until rustfmt settles on a format for it. So you may be surprised when this happens and it suddenly changes.
-
Hey Rustaceans! Got a question? Ask here! (50/2022)!
rust-analyzer and Clippy aren't not really involved with formatting. rustmft does autoformat to 4 spaces.
-
Hey Rustaceans! Got a question? Ask here! (48/2022)!
rustfmt is the official formatter.
-
Adding formatter and linter to rost_gen
This week, I added a formatter and linter to rost_gen (a static site generator) to improve the readability of the code and fix common issues automatically. I chose to use rustfmt for the formatter and rust-clippy for the linter.
-
Python multi-level break and continue
My example was "twice by one developer", not "twice across all indexed repos."
A spot check shows that quite a few in your link are used specifically to ensure correct handling of Rust multi-level breaks work syntax, like https://github.com/rust-lang/rust-analyzer/blob/master/crate... , https://github.com/rust-lang/rustfmt/blob/master/tests/sourc... , https://github.com/rust-lang/rust/blob/master/src/tools/rust... , https://github.com/rust-lang/rust/blob/master/src/tools/rust... and likely more.
Another is a translation of BASIC code to Rust, using break as a form of goto. https://github.com/coding-horror/basic-computer-games/blob/e...
The example at https://github.com/tokio-rs/mio/blob/master/tests/tcp.rs is a nice one
// Wait for our TCP stream to connect
-
Does Rust not need extra linting and sanitizing tools like C++?
There is clippy for additional lints, rust-analyser has some lints (and refactoring tools) that are not in the compiler, there is rustfmt for formatting code or checking if code is formatted and so on
-
Fixed Stacked Borrows violations in ArrayVec crate
In addition, running rustfmt on existing files often moves comments around in a way that changes their meaming. So just doing this blindly on files that are not prepared for rustfmt is a bad idea. This is not a theoretical concern, I have run into this several times, and sometimes this has slipped through review.
There are no settings that would make rustfmt produce the formatting I think is best. In particular match is often formatted pretty badly, no matter which settings are used. Here are just some of the issues: - https://github.com/rust-lang/rustfmt/issues/3157 - https://github.com/rust-lang/rustfmt/issues/3995 - https://github.com/rust-lang/rustfmt/issues/4004 - https://github.com/rust-lang/rustfmt/issues/4005
Helix
-
Crystal 1.0 vs Ruby 3.0 Benchmark
You hit the nail on the head. That’s exactly what I’ll be working on. Similar to what Helix did for Rust. https://usehelix.com/
What are some alternatives?
Clippy - A bunch of lints to catch common mistakes and improve your Rust code. Book: https://doc.rust-lang.org/clippy/
rust-analyzer - A Rust compiler front-end for IDEs [Moved to: https://github.com/rust-lang/rust-analyzer]
rust-analyzer - A Rust compiler front-end for IDEs
Rust for Visual Studio Code
vscode-rust
Ruru - Native Ruby extensions written in Rust
rutie - “The Tie Between Ruby and Rust.”
rust-on-raspberry-pi
sublime-rust - The official Sublime Text 3 package for the Rust Programming Language
CodeLLDB - A native debugger extension for VSCode based on LLDB
fast_blank
rr - Record and Replay Framework