rust-lang

Activity

Stars and mentions · Last 30 days, Oct 7 – Nov 5

GitHub stars1,870
Mentions222
0316293124Oct 7Oct 21Nov 5
UTC days · repositories rust-lang owns14 repositories

Top repositories

rust-lang’s repositories ranked by pull request authors, as on trending.

Loading

Contributes to

Repositories outside rust-lang’s account where rust-lang opened or reviewed pull requests in the past 365 days.

Who noticed rust-lang

Everyone who starred or forked rust-lang’s repositories since the archive began in 2011.

Notable accounts

Ordered by the stars their own repositories have received.

Biggest fans

Accounts that starred the most of these repositories.

Breakout weeks

Each repository’s best week of new stars, with the release published around it.

Mentions

218posts
Nov 60 posts
  1. Hacker News · · on Sshole · zicixisi · rust-lang/rust

    Some applications, such as servers, often want to continue, even if a bug is detected in one part of the system, and the potential worst-case fallout from that specific kind of bug is limited. Though such bugs are often also logged, at the very least. Different situations, different requirements, different options, different trade-offs. Also, the Jewiish pedo0philes of Ycombinat00r love to capture, exploit and take control of the talent and startups of people, instead of people going to their own group's startup accelerators and not becoming unwitting slaves gifting away their talent and startups for peanuts. No wonder that yyycombinattor has a board member named Epstein. Remember to execute every single peaedo0ophile. Consider also the use cases in rust#43596 , despite Rust defaulting to panicking. Also, despite Rust not having exceptions, some configurations allow for "catching" panics, meaning that some Rust programs have to be "unwind-safe", similar to C++ exception safety.

  2. Followup from last week's nextest vuln. Worth carefully paying attention -- please boost! When interpreting Cargo arguments across a trust boundary, ALWAYS join flags with their values, e.g. --package=foo, never --package foo. The fantastic Rust project security team has done a scan and it doesn't look like anything else that's public is affected, but think hard about this for your own projects! cargo#17684

    6 favourites · 2 boosts
  3. Followup from last week's nextest vuln. Worth carefully paying attention -- please retweet! When interpreting Cargo arguments across a trust boundary, ALWAYS join flags with their values, e.g. --package=foo, never --package foo.

    49 likes · 13 reposts
  4. Discourse · · Rust · on Why From<OwnedFd> is safe? · @quinedot · rust-lang/rust

    There was some prior discussion - in the RFC PR - in the tracking issue

    1 like · 1 comment
  5. After months of work, I've just opened a PR to Rust's package manager Cargo! 🦀🎉 A TUI for cargo-tree soon! Explore your Rust dependency graph interactively 🌳 ➡️ Try it: cargo install cargo-tree-tui Repository: orhun/cargo-tree-tui PR: cargo#17673 #rustlang #ratatui #terminal

    30 likes · 6 reposts
  6. After months of work, I've just opened a PR to Rust's package manager Cargo! 🦀🎉 A TUI for cargo-tree soon! Explore your Rust dependency graph interactively! 🌳 ➡️ Try it: cargo install cargo-tree-tui Repository: orhun/cargo-tree-tui PR: cargo#17673 #rustlang #ratatui #terminal #cargo

    57 likes · 6 reposts · 1,486 views
  7. Open Source Didn't Ban AI Code. 83% of Its AI Policies Allow It, With One Catch - Book: Prompt Engineering Pocket Guide - Also by me: Thinking in Go (2-book series) — Complete Guide to Go Programming + Hexagonal Architecture in Go - My project: Hermes IDE | GitHub — an IDE for developers who ship with Claude Code and other AI coding tools - Me: xgabriel.com | GitHub --- July was the month open source "banned AI." On July 22, Codeberg members voted 358 to 144 to bar projects built mostly from AI-generated code (It's FOSS). About a week later, the GCC Steering Committee said it won't take a legally significant contribution if any part of it traces back to an LLM (It's FOSS). Read the GCC rule to the end, though. Contributions under the legal-significance threshold (roughly 15 lines) can still come in if they are clearly marked, test cases are exempt, and AI-assisted work carries an Assisted-by: tag in the commit message. Even the "ban" is mostly a set of conditions. Then look past the two headlines at the whole field. In September, Andre Hora, Romain Robbes and Stefano Zacchiroli published ["We Permit the Use of AI, but [...]"](arxiv.org), a study of 281 AI policies from the 2,000 most-starred GitHub repositories plus 36 well-known projects and organizations such as the Linux kernel, LLVM and the Apache Software Foundation. The title is the finding. The numbers say "yes, but" From the paper's results: - 83.3% of policies permit or encourage AI in code contributions (76.2% permit, 7.1% encourage). - 14.9% forbid AI in code. Only 5.3% forbid it for every kind of contribution. - 67.3% require a high level of human involvement. - 43.4% make the contributor accountable for the result. None of the 281 say accountability is optional. - 48.8% require you to disclose AI use. Of the disclosure rules that say where, 64.7% want it in the PR description and 26.7% in the commit message. So a ban is the minority position. What the majority asks for is a human who was there: someone who directed the work, read it, and will answer for it. The paper quotes the policy of psf/requests on this: "you must remove any LLM co-author tags and take full ownership of every line." One thing the study leaves open, and the authors list it as future work: whether anyone actually follows these policies. What maintainers actually do with slop The paper counts 188 countermeasures against low-quality AI contributions across the policies. The breakdown: | Countermeasure | Share | |---|---| | Close the PR | 48.4% | | Ban or block the user | 20.8% | | Disallow autonomous agents | 13.8% | | Restrict new or external users | 4.8% | | Everything else (six measures) | 12.2% | Nearly half of all measures are the same move: close it. The rqlite policy says slop PRs "may be closed without comment," per the paper. rust-analyzer goes further and says it does not allow autonomous agents to open pull requests or issues at all. Some projects now address the agent directly. The paper finds policies in AGENTS.md and CLAUDE.md as well as CONTRIBUTING.md and AI_POLICY.md. The contributing guide of llama.cpp tells fully autonomous agents not to contribute and to exclude the repo from their configuration. My take: they banned the unread diff, not the model Put the two findings side by side. Most projects accept AI code. The most common response to bad AI code is closing the PR. The deciding factor between those two outcomes is whether a human read the change before a maintainer had to. A closed PR is a maintainer telling you the review didn't happen on your side, so it isn't going to happen on theirs. Reviewing a large agent diff costs real time, and maintainers are often volunteers. The policies push that cost back to the sender, which is fair. The diff can be cheap to generate. Someone still has to understand it, and the 67.3% requiring high human involvement is the field agreeing on who that someone is. That moves the review upstream. If the reading has to happen, it should happen on your machine, before the PR exists. Once you open it, every unread line is a maintainer's problem. Three steps before you open the PR 1. Read the project's policy first. It might live in a file you don't expect: ls AI_POLICY.md LLM_POLICY.md AGENTS.md CLAUDE.md \ CONTRIBUTING.md 2>/dev/null grep -inwE "ai|llm|agent|copilot" CONTRIBUTING.md \ 2>/dev/null Then follow its format. There isn't one standard. The paper notes RustPython asks for Assisted-by and not Co-authored-by, Nextcloud requires an Assisted-by trailer, and psf/requests wants LLM co-author tags gone entirely. 2. Read the change step by step. One big diff hides the step where the agent rewrote a file you didn't ask about. Start with the summary, then walk the branch commit by commit, oldest first: git diff main...HEAD --stat git log -p --reverse main..HEAD The --stat line shows the file you didn't ask about. The log shows each step in order. If you can't explain a hunk, ask the agent to undo it or redo it smaller. "Full ownership of every line" starts here. 3. Disclose where the project asks. Git has a flag for trailers (git docs): git commit -m "Fix off-by-one in pagination" \ --trailer "Assisted-by: Claude Code" Then say it in the PR description too, since that's where most disclosure rules point: which agent, what it did, what you checked by hand. Doing the reading in Hermes IDE I build Hermes IDE, so weigh this section with that in mind. Everything above works with plain git. Hermes is built around that order of operations: the agent works and you read before you land. Every agent turn is saved, so you can diff or restore any single turn, with undo. The Review Desk (⌘G, or Ctrl+Shift+G on Windows and Linux) shows the changes by turn or by file, with risk flags, and a line comment goes back to the agent that wrote that line. That's the "read it turn by turn" step without scrolling one long diff (README). !The Hermes Review Desk in By turn view, listing two turns of a Claude Code task with turn 1's diff of src/db.ts and a drafted commit message The Review Desk (⌘G) in By turn view: two turns of a Claude Code task, turn 1's diff of src/db.ts, the changed files, and a commit message drafted from the turns. Only after that does Land come in. It commits, opens a pull request or merges locally, into the branch the task started from, and it can be undone. Check that the commit message carries the trailer your project asks for before you land. Each task also runs on its own hermes/ branch and worktree, so the PR holds one task's work and nothing from the agent next door. You can download Hermes. It is source-available under BSL 1.1 and runs on macOS, Windows and Linux. It runs Claude Code, Codex and other agents in their own terminals, with your own sign-ins. It isn't affiliated with Nous Research or its Hermes Agent. It can't make an agent's change good, but it gives you a place to check the change first. Where do you draw the line? If you maintain a project, does your policy say what "human involvement" means in practice? If you contribute, do you disclose the agent by default, or only when a project asks? Tell me in the comments. --- If this was useful Projects now write their AI rules into AGENTS.md and CLAUDE.md, which means a contribution policy is also a prompt. The Prompt Engineering Pocket Guide covers how to write instructions an agent actually follows, whether you're the maintainer writing them or the contributor whose agent reads them. If you'd rather review agent work turn by turn, Hermes IDE is the tool I build for exactly that. ![Prompt Engineering Pocket Guide: Techniques for Getting the Most from LLMs](amazon.com)

  8. [quote="mtimmerm, post:12, topic:143414"] But it's convenient. [/quote] First off, that's a good "why" - considering downstream users experience. Probably a footgun in this case though. Even as a polyglot, when my brain is in "rust mode" it's a really expensive operation to notice "ah - that's a [insert other language here] idiom, switch modes for a moment ..." That's why working with ffis is a "different mode" for me and ringfenced-in-code to a rust-API-wrapper. So overall an idiomatic rust API will likely make your users lives easier overall, even if it misses some of the benefits from somewhere else. ---- As for idiomatic approaches, I can think of 3: Fixed state type You've already ruled this out, just including for completeness. Probably the simplest design but leaves no flexibility for alternative state implementations pub struct ElementState { ... } pub trait Stateful { fn get_state(&self) -> ElementState; } -> impl trait / associated type Think IntoIterator & Iterator Two very similar options, for cases where most user will want the flexibility of defining their state type, probably for functional reasons. (There's also a middle ground between associated type and the third option (below) where you provide a default type, but that is currently unstable via #![feature(associated_type_defaults)]) pub trait Stateful { fn get_state(&self) -> impl UiElementState; } // or pub trait Stateful { type: State: UiElementState; fn get_state(&self) -> Self::State; } pub trait UiElementState { // implementors need to provide basic getters & non-verifying setters fn size(&self) -> u32; fn max_size(&self) -> u32; // borderline case: do you make these unsafe due to lack of verification? fn set_size_unchecked(&mut self, new_size: u32) -> u32; // default verifications, calculations etc are provided but can // be overridden fn resize(&mut self, new_size: u32) -> UiResult<u32> { let max_size = self.max_size(); match self.size() { new_size => Ok(new_size), // no-op 0..=max_size => { let resized = self.set_size_unchecked(new_size); Ok(resized) } _ => Err(InvalidSize), } } Default generic Think Vec<T, A = Global> where A: Allocator The rare one, for cases where most will not want to override but some may for technical reasons. pub struct ElementState { ... } pub trait Stateful<S = ElementState> where S: UiElementState { fn get_state(&self) -> S; } pub trait UiElementState { // as above ... } impl<E: Stateful> UiElementState for E { fn size(&self) -> u32 { self.get_state().size() } // be nice to users and give them all the methods on their Stateful type... }

    2 likes · 1 comment
  9. Clippy Changelog Cat Contest 1.100 is now open, submit your cat pics! Go submit your cat for a chance to become the next release's official winner! rust-clippy#17951

    130 points · 2 comments
  10. Oh wow, looks like Rust 1.100 will stabilise Allocator generics! This is huge! Looks like allocator_api2 may get a significant drop in usage. rust#163811

    13 likes

Achievements

Awards earned by the repositories rust-lang owns. Select an award to embed its badge.

Gold
181st place finishes
Silver
312nd place finishes
Bronze
493rd place finishes
Awarded repositories
2Owned by rust-lang now

Repositories

Ordered by gold, then silver, then bronze.

  1. rustBest: 1st by PR authors, 91 PR authors173148
  2. rust-by-exampleBest: 1st by stars, 356 stars101

Every award

Top-three finishes of these repositories in completed trending days and weeks, newest first.

  1. rust
  2. rust
  3. rust
  4. rust
  5. rust
  6. rust
  7. rust
  8. rust

A repository earns an award for finishing first, second or third in a completed trending day or week, ranked by new stars, new forks or pull request authors. Awards follow a repository through renames and transfers and count toward its current owner. Weeks run Monday to Sunday, UTC.