|3 days ago||6 days ago|
|Apache License 2.0||GNU General Public License v3.0 or later|
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.
Learning Rust by Building a CLI App
3 projects | dev.to | 25 Aug 2023
To create a new application we'll use cargo (a build tool and also a package manager for Rust. It is used for scaffolding new library/binary projects). So in your projects folder, you can run this command in your terminal:
Leaving Haskell Behind
7 projects | news.ycombinator.com | 24 Aug 2023
> ...but at the end of the day Cargo is the reason that Rust is popular.
FWIW, maybe that's true for you, but there are numerous other advantages to the language for which many people choose to use Rust--some even "despite" Cargo: you see Google having had to put in way way WAY too much work to get Bazel working for Rust :/--that it honestly feels a bit like belittling an extremely important language to make this claim so flippantly.
> You can set a default build target for a Cargo project with two lines of configuration, no nightly features necessary...
This doesn't work as, as soon as you start setting target-specific options, it infects the host build, as they incorrectly modelled the problem as some kind of map from targets to flags. If you don't believe me, on your Linux computer, try cross-compile something complicated that will runs on a "least common denominator" Linux distribution, such as CentOS 7.
> Can you clarify what this is referring to?
Sure. I've Googled rust cargo target host bugs for you (which, FWIW, finds a number of bugs I've filed or have talked about, but it isn't as if I have a list anywhere). Note that one of these bugs is "closed", but I still provide them for context as a patch might have been merged but (as you'll find out if you read through all of these) it isn't stable.
The result of this work being left incomplete is that increasingly large numbers of "serious" projects--things I'd expect people in packaging land to have heard of, such as BuildRoot--are being forced to set the ridiculous environment variable __CARGO_TEST_CHANNEL_OVERRIDE_DO_NOT_USE_THIS="nightly" in order to get access to a flag that makes Cargo sort of work.
(And yet, I often see people surprised at how long it is taking for various of the more important clients to fully get into using Rust, as the safety issues are so severe from continuing to use C/C++: as you made the contention that you believe the reason why people use Rust is Cargo, I will say the opposite: the reason why we don't see more Rust is also Cargo.)
Rust vs. Go in 2023
9 projects | news.ycombinator.com | 13 Aug 2023
What has worked for me so far:
(do the exercises!)
plus a little bit of:
(There's no need to remember the last URL -- just google "rust xxx" and you will get the right page.)
I'm looking forward to reading this:
Sprinkle some blog posts on top:
... and the rest is just a matter of applying enough sweat :)
PackagingCon – a conference only for software package management
6 projects | news.ycombinator.com | 8 Aug 2023
I actually agree, yet it still has shortcomings. For eg https://github.com/rust-lang/cargo/issues/545 is still open (it's from 2014!!)
The Lazy Terminal Calculator
3 projects | dev.to | 21 Jul 2023
Rust uses a system to manage its libraries called Cargo. You can read more here. We can edit the Cargo.toml file and add the library under [dependencies].
5 projects | news.ycombinator.com | 13 Jul 2023
From cargo's changelog 
> Automatically inherit workspace fields when running `cargo new`/`cargo init`. #12069 
imo I think this is a big quality of life improvement
Testing the memory safe Rust implementation of Sudo/Su
9 projects | news.ycombinator.com | 28 Jun 2023
You're probably running into this: https://github.com/rust-lang/cargo/issues/7058
`cargo vendor` will download dependencies for all platforms, which leads to a lot of unused code being pulled in. In this case, the Windows API and Microsoft compiler wrappers.
In this instance, during the build process "tempfile" is used as a dev-dependency, which has a runtime dependency on windows-sys when compiling Windows binaries. I'm not entirely sure why (commenting it out in Cargo.toml doesn't seem to break the build).
After commenting it out and manually removing the spurious Windows API files as well as the unrelated packages (ctor diff output_vt100 pretty_assertions proc-macro2 quote syn unicode-ident yansi), I get the following results:
Is there something "different" about Cargo's resolver in GitHub Actions?
3 projects | /r/rust | 27 Jun 2023
btw we are looking at making the resolver to automatically select compatible MSRV dependencies. See https://github.com/rust-lang/cargo/issues/99303 projects | /r/rust | 27 Jun 2023
Looking around I found also https://github.com/rust-lang/cargo/issues/10599, so I think I'm remembering correctly. Note that that mentions public/private dependencies. Most likely, we'd be dropping the resolver parts of the feature (for now). See https://github.com/rust-lang/rust/issues/44663.
Rust Module System Encourages Bad Practices
3 projects | news.ycombinator.com | 7 Jun 2023
cargo fetch gets most of the way there. But you would need to build them as well to actually get good performance.
This is the upstream issue in question: https://github.com/rust-lang/cargo/issues/2644
Cargo fetch and/or cargo-chef kind of does these things, but not in a super intuitive and easy to use way.
New clippy lint: detecting `&mut` which could be `&` in function arguments
2 projects | /r/rust | 10 Jul 2023
You should not blindly follow clippy lints. They are sometimes wrong. Another example https://github.com/rust-lang/rust-clippy/issues/9782 .2 projects | /r/rust | 10 Jul 2023
Let else will finally be formatted by rustfmt soon
5 projects | /r/rust | 3 Jul 2023
My deduplication solution written in Rust beats everything else: casync, borg...
2 projects | /r/rust | 24 Jun 2023
I often write () = f() to assert that f() is unit. Unfortunately clippy warns on such code ( https://github.com/rust-lang/rust-clippy/issues/9048 ). There are very recent pull requests for this bug, so hopefully this bug will be fixed very soon. But meanwhile I invented this workaround: [()] = [f()] :)
Any open source projects willing to take in juniors?
7 projects | /r/rust | 24 May 2023
Apart from running clippy on many projects being essential, clippy is also an exceptionally welcoming project, no matter your prior knowledge.
Any new Opensource projects in (rust) looking for contributors. I want to start my journey as an OSS contributor.
17 projects | /r/rust | 14 May 2023
clippy is a great place to get started :) though it isn't exactly new.
I want to contribute in a big project
6 projects | /r/rust | 1 May 2023
clippy is also pretty compiler-adjacent and unlike rust-analyzer uses rustc's internal APIs. Don't let the size of the code base scare you off! It's actually feasible for a newcomer to contribute even such a substantial change as a new lint, and we have issues labeled as "good first issue" that come with mentorship, so you don't need to go it alone.
rustc-plugin: A framework for writing plugins that integrate with the Rust compiler
6 projects | /r/rust | 18 Apr 2023
Yes, you could use it to write a lint. Although you might find it easier to just fork Clippy and add your own lints to their existing framework.
2 projects | /r/rust | 11 Apr 2023
Check out the readme for more information.
Rust Tips and Tricks #PartOne
3 projects | dev.to | 8 Apr 2023
They are two of my favorite Rust tools. If you haven’t tried them yet, I highly recommend giving them a try. Clippy can detect various lints in your code and guide you towards writing more idiomatic code. To install Clippy, simply run rustup component add clippy, and to run it within your workspace, execute cargo clippy. For more details, visit Clippy’s GitHub repository.
What are some alternatives?
rustfmt - Format Rust code
rust.vim - Vim configuration for Rust.
Rust for Visual Studio Code
rust-analyzer - A Rust compiler front-end for IDEs [Moved to: https://github.com/rust-lang/rust-analyzer]
intellij-rust - Rust plugin for the IntelliJ Platform
sublime-rust - The official Sublime Text 3 package for the Rust Programming Language
RustCMake - An example project showing usage of CMake with Rust
emacs-ycmd - Emacs client for ycmd, the code completion system.
CodeLLDB - A native debugger extension for VSCode based on LLDB
cargo-update - A cargo subcommand for checking and applying updates to installed executables
RustScan - 🤖 The Modern Port Scanner 🤖