Project ideas from Hacker News discussions.

Rust project goals: Immobile types and guaranteed destructors

📝 Discussion Summary (Click to expand)

1. Structured concurrency for async
Rust wants to give async tasks the same deterministic lifetime guarantees that threads have today. “The big one is scoped tasks, or structured concurrency,” explains [simonask] – enabling safe borrowing of stack data in async contexts and better cancellation control.

2. Immovable / must‑move types
A long‑awaited “immovable” or “must‑move” capability would let the compiler enforce that a value must be explicitly dropped or moved, preventing accidental leaks. [simonask] notes, “If instead the transaction is a must‑move type, you would get a compiler error if you fail to call exactly one of either commit or rollback,” highlighting how this catches missed cleanup.

3. Ergonomic async improvements
Community members point out that current async code is “awkward” and “annoying” due to Pin and borrowing limits. [pornel] says, “It doesn't really add anything new and flashy, but removes some annoying warts,” while [aabhay] adds that it “makes it easier for async functions to borrow rather than clone from their outer scope.”


🚀 Project Ideas

Generating project ideas…

[ScopedAsyncRunner]

Summary

  • [Rust async developers struggle with unscoped task lifetimes, making recursive async code and cancellation error‑prone.]
  • [Core value: Structured concurrency that enforces task completion before scope exit.]

Details

Key Value
Target Audience Rust async developers building background workers, web servers, CLI tools
Core Feature Scoped async task execution with automatic join on drop and cancellation propagation
Tech Stack Rust library using tokio, pinning, and async executor
Difficulty Medium
Monetization Revenue-ready: Subscription (e.g., $5/mo for premium features)

Notes

  • [HN commenters like simonask highlighted “scoped tasks” as a major missing feature; this directly addresses that request.]
  • [Provides practical utility by letting developers write recursive async functions without clone‑heavy workarounds, improving ergonomics.]

[MustMoveTransaction]

Summary

  • [Many Rust APIs need deterministic finalization (commit/rollback) to avoid silent resource leaks, but current async APIs lack compile‑time guarantees.]
  • [Core value: Enforce must‑move transaction types that must be explicitly finalized, catching leaks at compile time.]

Details

Key Value
Target Audience Systems programmers designing transactional or RAII‑style APIs in async Rust
Core Feature Compile‑time enforcement of must‑move resources that require exactly one finalizer call (commit or rollback)
Tech Stack Rust nightly + experimental immovable type feature, wrapper crate
Difficulty High
Monetization Revenue-ready: One‑time license (e.g., $15)

Notes

  • [Inspired by OskarS’s discussion on needing a compiler‑enforced commit/rollback API to avoid silent rollback or panic.]
  • [Enables safer async transaction patterns, increasing confidence in resource management.]

[ForgetSafe]

Summary

  • [Current mem::forget and reference‑cycle leaks are unsafe and error‑prone, leaving developers with no ergonomic way to explicitly leak resources.]
  • [Core value: Automatic Forget bound enforcement for cyclic types, providing safe leak semantics without unsafe code.]

Details

Key Value
Target Audience Systems programmers dealing with reference cycles, long‑running caches, and FFI contexts
Core Feature Proc‑macro that adds #[forget] attribute or automatically implements Forget for types with cycles
Tech Stack Rust proc‑macro crate, integrates with std collections
Difficulty Low
Monetization Hobby

Notes

  • [stymaar suggested making reference‑counted pointers require Forget on their pointee, an idea this project implements.]
  • [Addresses community calls for safer leak semantics, useful for resource caches and debugging scenarios.]

Read Later