Project ideas from Hacker News discussions.

Eurydice: a Rust to C compiler

๐Ÿ“ Discussion Summary (Click to expand)

The three most prevalent themes in the discussion are:

  1. The Enduring Relevance and Stability of C, Primarily Due to the C ABI: Many users believe C will persist for a very long time, not necessarily as a preferred language for new code, but because it forms the de facto Application Binary Interface (ABI) that modern languages and operating systems rely upon.

    • Quotation: "C as an interface is going to be around for a very long time, like POSIX and OpenGL and the SysV ABI standard. C as an actual language might not..." stated by "thristian".
    • Quotation: "The C ABI will definitely stick around. That doesn't necessarily mean C will. (Though it probably will have a very drawn-out death.)" stated by "IshKebab".
  2. The Role of C/Rust as Build System/Ecosystem Glue vs. Application Language: The discussion contrasts the dependency management strengths of Rust's Cargo with the system-level environmental control provided by Nix. Furthermore, there is debate over whether Rust aims to replace C or C++, and the utility of C as a universal intermediate format.

    • Quotation: "Cargo does not attempt to solve the same problems as Nix (if you depend on any software not written in Rust)." stated by "skavi".
    • Quotation: "If you write a library in Rust and want to make that library available to other language ecosystems, not requiring a Rust compiler toolchain for using the library is a pretty big plus - instead create a C source distribution of the library, basically using C as the cross-platform intermediate format." stated by "flohofwoe".
  3. The Value of Language Evolution and the Acceptance of Obsolescence (or "Zombification"): Users debated whether it is desirable for Rust (or any new language) to eventually be superseded by something "10x better," comparing the potential future of C to the persistence of COBOL. Some users expressed concern over transition cost, while others welcomed progress regardless of the longevity of current favored tools.

    • Quotation: "IMHO it would be completely amazing if magically something 10x better than Rust came along tomorrow, and I'd bet most Rust people would agree. Death should be welcomed after a well lived life." stated by "mustache_kimono".
    • Quotation: "If all Rust accomplishes is ushering some other better project, it would have been worth it." stated by "estebank".

๐Ÿš€ Project Ideas

Rust-to-C Ecosystem Documentation & Analysis Service

Summary

  • A web service that automatically analyzes Rust-to-C transpilation outputs (like those from rustc_codegen_clr or similar future tools) and generates human-readable documentation, usage guides, and static analysis reports.
  • Core value proposition: Democratizing the use and debugging of Rust code compiled via C intermediaries, addressing the pain point of unreadable generated C code for library consumers.

Details

Key Value
Target Audience Developers consuming Rust libraries via C interfaces, embedded system developers using manufacturer-provided C compilers, and Rust library authors targeting C ABI compatibility.
Core Feature Automated generation of canonical documentation (API maps, structure definitions, dependency graph visualization) from generated C source files and associated Rust source (if available).
Tech Stack Rust (for parsing C headers/source, potentially using syn or similar analysis tools), Web Frontend (React/Svelte), Backend (e.g., Python/FastAPI or Rust/Axum) for hosting and analysis jobs.
Difficulty Medium
Monetization Hobby

Notes

  • Users noted: "You will at some point need to look for bugs in the generated C layer, which will really suck." and "Users of the C library can't read your source to understand what it does internally without an extra step to figure out what rust code the thing they use corresponds to."
  • This tool directly addresses the maintainability and transparency issues raised when using C as an intermediate distribution format, making the "zombified" C usable.

Universal Compiler Backend Target Analyzer (U-CBTA)

Summary

  • A diagnostic tool/library that analyzes existing manufacturer compiler toolchains (often customized GCC forks) to determine their exact capability profile relative to modern standards (e.g., specific LLVM IR transformations supported, C standard compliance level, ABI specifics).
  • Core value proposition: Providing clear compatibility matrices and configuration advice for Rust-to-C transpilation targets, removing guesswork for embedded developers dealing with proprietary toolchains.

Details

Key Value
Target Audience Embedded systems engineers, developers working on niche/proprietary hardware, and compiler writers attempting to bootstrap Rust for new targets via C.
Core Feature Input a manufacturer's compiler path; the tool runs diagnostic test cases (generated from Rust MIR representations) and reports back on optimizer limitations, undocumented behaviors, and necessary C compatibility flags.
Tech Stack Python/Shell scripting for orchestration, running target toolchains in limited environments (e.g., qemu/native), Rust analysis tools.
Difficulty High
Monetization Hobby

Notes

  • Addressing the reality mentioned by users: "Most teams who write code for embedded devices... are almost always stuck with the compiler the manufacturer decided to give them." and "They modify their existing compiler... from scratch."
  • This automates the painful manual testing that teams currently undertake to see if their Rust-generated C code will compile without runtime surprises on obscure hardware.

C/C++ Legacy API Mapping & Interoperability Layer Generator

Summary

  • A service that ingests existing complex C/C++ library interfaces (e.g., Linux kernel headers, OpenGL specs) and automatically generates robust, idiomatic Rust extern blocks along with safe wrappers (using techniques similar to cbindgen but generalized for C++ concepts).
  • Core value proposition: Streamlining the integration of long-lived C libraries (like POSIX, BLAS/LAPACK) into modern Rust projects, solving the interoperability friction mentioned by users who prefer Rust but rely on C for core functionality.

Details

Key Value
Target Audience Rust developers working in systems programming, data science (consuming Fortran/C libraries like BLAS), and kernel/OS development who need reliable C bindings.
Core Feature Input C header files (or toolchain documentation references); output validated, idiomatic, and memory-safe Rust bindings, including automatic handling of legacy types (like C strings) with pragmatic solutions (e.g., opting for unsafe blocks where necessary, clearly documented).
Tech Stack Rust (primary development language), leveraging existing parsing tools (e.g., bindgen precursors or custom C/C++ parser like libclang bindings).
Difficulty Medium
Monetization Hobby

Notes

  • Addresses the sentiment: "C is the โ€œgreatest common denominatorโ€ for several decades already... they all can use C libs." and the desire for C to act as a stable, standardized interface layer.
  • While bindgen exists, this suggests a more focused solution for complex or evolving standards (like the SysV ABI dependencies) where basic header parsing isn't enough, offering higher-level safety wrappers derived from deep C ABI knowledge.