Project ideas from Hacker News discussions.

11 year old unsoundness bugs found in Rust borrow checker

📝 Discussion Summary (Click to expand)

1. How common/custom Drop implementations are in real‑world Rust code
- “Not really. I've worked with rust for 4 years, systems side, and never had to write a custom drop implementation.” — jvanderbot
- “I've written dozens of custom Drop implementations.” — bryanlarsen
- “That's easily the exception rather than the rule. I've seen custom Drop implementations in almost every non‑trivial Rust codebase I worked on.” — neysofu
- “A custom Drop appears very quickly with FFI code.” — gspr

2. Concerns about Rust’s soundness and safety guarantees
- “Now we are at the phase where, Rust is “safe” but only if you use it “correctly” … This is the problem when a language advertises with “guarantees” and it turns out it never had any.” — rvz
- “so what I take from this is that the rust compiler does not guarantee the stuff it claims to.” — vrighter
- “When people describe Rust as 'a memory‑safe programming language' they are describing an aspirational vision, and not a programming language that has actually been designed with sufficient rigor to guarantee memory safety.” — csande17
- “Not to talk about Go, which has intentional unchecked‑at‑runtime UB … yet many argue to consider it memory safe.” — afdbcreid

3. Why the bug remained undiscovered for so long (rarity / normal‑code expectations)
- “What the hell. This is not the esoteric, crazy, impractical constellation … The minimal example is so simple and is definitely something you'd easily come across in normal code.” — vincent-uden
- “I wonder if the reason it works is because you'd easily come across it in normal code, and someone didn't realize that saving the effort of implementing a check for this would result in unsoundness.” — LoganDark
- “The fact that nobody reported this before means it's not, by definition.” — fg137
- “I don't understand how something like this could take so long to be discovered. Pretty crazy stuff.” — Hugsbox

4. Discussion of formal verification, proven compilers, and ongoing verification efforts
- “If you want a verified compiler, you pretty much have to choose between using a subset of standardml or a subset of C and the one proven compiler for each.” — vrighter
- “The eventual goal is verification of the full system … all soundness bugs will be either found and fixed or we'll know how to fix them once they're found.” — afdbcreid
- “There is a formally proven compiler for a large subset of C, so I don't see why formalizing (a large subset of) rust and making a formally proven compiler shouldn't be possible.” — wongarsu
- “I don't think the definition of 'memory safe' has ever required full end‑to‑end stack conformance with a proof. Very few languages have achieved that, though some have.” — insanitybit


🚀 Project Ideas

RustSoundnessScanner

Summary

  • Uses LLMs fine‑tuned on known Rust compiler soundness bugs to flag risky patterns in pull requests.
  • Core value: catch unsound lifetime/variance issues before they reach production, reducing UAF bugs.

Details

Key Value
Target Audience Rust library maintainers and safety‑critical developers
Core Feature AI‑driven static analysis that highlights code resembling the custom Drop lifetime bug and other variance‑related unsoundness
Tech Stack Python (FastAPI), HuggingFace Transformers, Rust‑analyzer CLI, GitHub Actions
Difficulty Medium
Monetization Revenue-ready: SaaS tiered pricing (free for OSS, $20/mo per private repo)

Notes

  • HN commenters expressed desire for “AI‑based searching of the Rust compiler for bugs” (lambdaone) and worry about subtle lifetime bugs that compile but are unsafe.
  • Could spark discussion on balancing AI assistance with formal verification and improve crate safety.

PrustiCI

Summary

  • Hosted CI service that runs the Prusti verifier on every push, automatically proving absence of panic, overflow, and memory safety violations.
  • Core value: give teams formal guarantees without needing to install complex provers locally.

Details

Key Value
Target Audience Enterprises using Rust for safety‑critical systems, open‑source projects wanting proof‑carrying code
Core Feature Automated Prusti verification with annotated contracts, failure reports annotated on source lines
Tech Stack Rust (Prusti), Docker, Azure Pipelines / GitHub Actions backend, Web UI (React)
Difficulty High
Monetization Revenue-ready: Subscription based on monthly verification minutes (e.g., $0.05 per minute)

Notes

  • Commenters noted the need for formal verification of the type system and praised efforts like Prusti; a CI service lowers the barrier.
  • Enables discussion on what properties can be proved and encourages adoption of verification in the Rust ecosystem.

DropLint

Summary

  • A Clippy lint that detects Drop implementations with lifetime parameters or conditional impls based on generics, flagging potential unsoundness.
  • Core value: prevent the class of bugs exemplified by the custom Drop lifetime soundness issue before they compile.

Details

Key Value
Target Audience Rust developers writing unsafe or FFI code, library authors
Core Feature lint rule that triggers on impl<T: ...> Drop for ... where T appears in where‑clauses or where the impl is conditional on a generic parameter
Tech Stack Rust (Clippy lint), rustc_interface, distributed via crates.io
Difficulty Low
Monetization Hobby

Notes

  • Several commenters noted they had never seen custom Drop in production and questioned its necessity; a lint would make such patterns explicit and reviewable.
  • Low effort to adopt, could be integrated into rustfmt/clippy CI, prompting discussion on safe Drop usage.

RustSanitizerHub

Summary

  • Provides a simple CI action that builds and runs Rust test suites under ASAN, MSAN, UBSAN, and aggregates sanitizer reports into a comment on the PR.
  • Core value: catch memory‑unsafety that slips past the borrow checker (like the soundness bug) early in the development cycle.

Details

Key Value
Target Audience All Rust projects, especially those using unsafe or FFI
Core Feature One‑click GitHub Action that instruments with LLVM sanitizers, runs tests, and uploads a summarized report
Tech Stack Bash/action, LLVM sanitizer tooling, Docker, optional Rust wrapper crate
Difficulty Low
Monetization Hobby (free OSS) or Revenue-ready: $5/mo for private repos with advanced reporting

Notes

  • HN participants mentioned running tests under ASAN to catch UB (medler) and wished for easier integration.
  • A ready‑to‑use action would lower friction, encouraging more teams to sanitize and discuss findings.

Read Later