Project ideas from Hacker News discussions.

Stabilizing Rust's Never Type

📝 Discussion Summary (Click to expand)

1. The never type is useful for expressing divergent computations and error‑free results
- “The never type seems very useful in various languages to either signal that a branch can never happen … or to mark that a function will never return a value …” – epolanski
- “My favourite never type ability is when you need to conform to a trait that returns Result but your specific implementation can never produce an error. Return Result<T, !> and the compiler knows that callers never have to check the error case …” – cipherjim

2. Implementing traits for ! runs into problems with associated types and coherence
- “The Default trait provides a function that actually constructs the type in question. But here the ! type can never be constructed, so the only way to implement Default would be to have it panic, loop infinitely, or otherwise fail at runtime.” – tux3
- “What would <! as Iterator>::Item be? … if you havetrait Foo: Iteratorandtrait Bar: Iteratorhow could!` implement both of them? It would simply make the language incoherent.” – dlubarov / SkiFire13

3. Naming and readability of the never type (! vs a named alias)
- “Is it obvious to rust developers that '!' would be the never type? … I feel like a longer more human‑understandable name would've been a good decision here.” – LatticeAnimal
- “Because we call it 'the never type' in casual conversation, the most natural thing to do would be to just have a type alias called Never that we could encourage people to use instead.” – kibwen
- “Yeah I think just calling it 'Never' is much clearer, this isn't something that needs a dedicated single character, and ! is less readable imo.” – p1necone
- “It really baffles me why a symbol like ! was spent on this, which could be more useful for a more commonly used feature.” – amomchilov


🚀 Project Ideas

Generating project ideas…

Neverify

Summary

  • A utility crate that provides a canonical type Never = !; alias together with ergonomic macros and zero‑cost trait implementations for exhaustiveness checks, explicit never‑to‑T conversions, and safe default implementations.
  • Core value proposition: lets Rust developers write -> Never and use the never type in generic contexts without running into trait coherence problems or accidental runtime panics.

Details

Key Value
Target Audience Rust library authors and application developers who use or want to use the never type (!) for infallible functions, state machines, or exhaustive pattern matching.
Core Feature Provides type Never = !; plus macros like never_exhaustive!() and conversion helpers never_to<T>(x: Never) -> T that are marked #[inline(always)] and #[must_use] to guarantee compile‑time correctness.
Tech Stack Rust 2021 edition, procedural macros, #[cfg_attr(not(test), deny(improper_ctypes))] for safety, CI with GitHub Actions.
Difficulty Medium
Monetization Hobby

Notes

  • HN commenters expressed a desire for a readable name (Never = !; as noted by kibwen and p1necone) and frustration with associated type incoherence (SkiFire13, lubarov). Neverify directly addresses those pain points.
  • By offering zero‑cost, explicit conversion utilities, it prevents the implicit coercion concerns raised by kccqzy and echelon, encouraging discussion on type‑sound never usage in generic code.

NoPanicLint

Summary

  • A Clippy‑style lint plugin (also usable as a rustc driver) that enforces crate‑level safety flags such as nopanic, no-implicit-coercions, max-dependency-depth, and rust-only via configurable deny rules.
  • Core value proposition: gives teams a way to statically guarantee that a crate (and its dependencies) adheres to strict safety policies, turning the ad‑hoc wishes from the thread into enforceable compile‑time checks.

Details

Key Value
Target Audience Rust teams and open‑source maintainers who want to publish or consume crates with guaranteed absence of panics, implicit coerions, or unsafe dependencies.
Core Feature Parses Crate.toml [package.metadata.no-panic-lint] options, scans the crate and its dependency tree, and emits lint warnings/errors for disallowed patterns (e.g., panic!, implicit ! → T coercions, use of unsafe blocks, or dependencies lacking the same flags).
Tech Stack Rust, the rustc_driver API, Clippy lint infrastructure, cargo metadata for dependency graph, optional WASM wrapper for online playground.
Difficulty High
Monetization Hobby

Notes

  • The thread featured echelon’s request for “nopanic, nocoerscion, maxdependencydepth, rustonly, nolinking, etc. flags” and the desire to filter crates.io by these properties; NoPanicLint makes those flags actionable at compile time.
  • By integrating with Clippy, it fits naturally into existing Rust workflows, likely to be welcomed by commenters who discussed the need for static guarantees (kibwen, muncher).

CrateScan

Summary

  • A web service and public API that analyzes crates.io crates for safety properties (use of panic!, implicit never coercions, presence of never type, unsafe, dependency depth, etc.) and exposes searchable/filterable results plus badges.
  • Core value proposition: enables developers to quickly find crates that meet their project’s safety criteria (e.g., “nopanic” or “no implicit coercions”) and encourages library authors to adopt better practices via visible metrics.

Details

Key Value
Target Audience Rust developers selecting dependencies, security auditors, and crate maintainers who want to showcase their crate’s safety guarantees.
Core Feature Periodically downloads crates, runs static analysis (using rustc + cargo-expand + custom miri/lint plugins) to compute flags like nopanic, no-implicit-coerc, never-used, max-dep-depth; provides a search UI, API endpoints, and embeddable badge SVG.
Tech Stack Rust backend (Actix-web), PostgreSQL for metadata, Grafana/Tera for UI, GitHub Actions for periodic re‑analysis, optional frontend in Svelte or Yew.
Difficulty High
Monetization Revenue-ready: “Freemium: free tier for public crates, paid private crate analysis and SLA”.

Notes

  • Commenters like echelon wanted to “filter crates.io by these properties” and “advertise a crate's safety”; CrateScan directly fulfills that ask.
  • Providing badges and a searchable catalog would spark discussion on safety culture in the Rust ecosystem, addressing the enthusiasm for stricter guarantees shown throughout the thread.

Read Later