Project ideas from Hacker News discussions.

Rust project goals: Immobile types and guaranteed destructors

📝 Discussion Summary (Click to expand)

3 Dominant Themes in the Discussion

# Theme Key Take‑away Representative Quote
1 Ergonomic async recursion & structured concurrency The community wants a way to write recursive async functions and to have scoped async tasks (similar to scoped threads) that are guaranteed to finish before their spawner returns. “It makes it easier to write recursive async functions. It makes it easier for async functions to borrow rather than clone from their outer scope.” – aabhay
“The big one is scoped tasks, … To make the situation worse, there are many cases where Rust futures are much more prone to cancellation … Getting this stuff under control is why people say that ‘async cancellation’ is a difficult problem.” – simonask
2 Immovable / !Move types to replace the current Pin model A new “effect” trait (?Move) would let the compiler treat non‑movable types as a language primitive, eliminating the need for the cumbersome Pin/Unpin dance and opening the door to linear types. “The big one is scoped tasks … This would finally give Rust the same sort of structured‑concurrency guarantees that synchronous code already has.” – simonask
“Immovable and unforgettable are both interesting properties of an object that could be used to design many cool APIs in general.” – simonask
3 Algebraic‑effects‑style tracking with !Forget Several users pointed out that the proposed !Forget (and related) traits would let the type system infer side‑effects such as drops, moves, and forgets, turning effect handling into a compile‑time feature rather than a manual discipline. “The traits are essentially effect handlers for effects like drop<T>, move<T>, forget<T> … If Rust had a proper algebraic effects type system, you would be able to see this directly in the signature of the function.” – Tazerenix
“I haven't seen any algebraic effects system that is that powerful … The closest is linear types but even then drop isn't an effect but also a function you can call to allow not continuing the references.” – Guvante

These three themes capture the most‑frequently‑cited topics: async ergonomics, the desire for a built‑in immovability primitive, and effect‑tracking via !Forget/linear‑type ideas.


🚀 Project Ideas

[AsyncRecursionHelper]

Summary

  • Enables recursive async fn without manual Box::pin or cloning captures.
  • Removes boilerplate from async recursion patterns discussed by aabhay and simonask.

Details

Key Value
Target Audience Async library maintainers, SDK developers, systems programmers
Core Feature Attribute‑driven #[async_recursive] macro + compiler plugin to infer recursive futures and allow borrowing without clones
Tech Stack Rust nightly, procedural macros, LLVM, existing tokio runtime
Difficulty Medium
Monetization Revenue-ready: Subscription

Notes

  • Directly solves simonask’s question “how does it actually change the recursive async story?” by providing ergonomic recursion.
  • Would attract contributors looking to replace manual Box::pin hacks with a first‑class feature.

[StructuredAsyncTasks]

Summary

  • Provides scoped task spawning and structured concurrency primitives for async code.
  • Guarantees child tasks finish before the spawner exits, eliminating cancellation bugs.

Details

Key Value
Target Audience Applications needing reliable cancellation (e.g. servers, GUI, CLI tools)
Core Feature scoped_spawn and ScopedTaskGroup APIs that integrate with Tokio/async‑std and enforce lifetime safety
Tech Stack Rust, async runtime traits, tokio internals, minimal unsafe code
Difficulty Low
Monetization Revenue-ready: Tiered SaaS license for enterprise support

Notes

  • Mirrors simonask’s “scoped tasks” idea, addressing the pain point that “async can’t guarantee completion”.
  • Offers clear practical utility for developers frustrated with tokio::spawn awkwardness.

[MustMoveTransaction]

Summary

  • Introduces compile‑time checking of “must‑move” types that require explicit commit/rollback.
  • Eliminates silent rollback/panic hazards in transactional APIs.

Details

Key Value
Target Audience Library authors designing resource‑management APIs, fintech, databases
Core Feature MustMove trait forcing destructors to be called via commit or rollback; ergonomic ergonomics via fn commit(self) -> Result<…> patterns
Tech Stack Rust stable, custom proc‑macro, generic const generics, no_std support optional
Difficulty High
Monetization Revenue-ready: Open‑source core + paid consulting for integration

Notes

  • Directly references simonask’s example of transaction APIs lacking compile‑time guarantees.
  • Appeals to developers seeking safer composable APIs, offering both discussion material and practical utility.

Read Later