On Mon, Jul 14, 2025, 11:46 PM The Cuthour via Gcc <gcc@gcc.gnu.org> wrote:

>
> I think Rust's cargo is a de facto standard build system and package
> manager, tightly integrated with the language and compiler.
>
> I'm proposing something similar for C and C++:
>   - cargo-c for C
>   - cargo-cc for C++
>   - cargo-s for assembler


> Each one would support:
>   - Detecting all modified files and recompile only what's needed
>   - Tracking derived classes and template instantiations
>   - Tracking uses of inline functions and recompiling dependents
>   - Managing dependencies without header files or macros (where possible)
>
> The key idea is:
> **C/C++ could optionally be written without header files**, by using a
> build system
> that tracks function/type definitions and ensures visibility project-wide.
>

There are c++ modules. Which is being designed. Maybe that is what you
looking for.

Also Why not just use gnu make?

It has the ability to handle automatic dependence generation for headers
already and is how gcc handles its own build system without having to
record every new header that is included.



> Why this matters:
>   - Avoids redundancy and human error
>   - Makes C++ more tractable and tool-friendly
>   - Brings it closer to the productivity of Rust/Java without changing the
> syntax
>
> Do you think this direction could benefit the GNU system or help evolve
> GCC?
>
>
>

Reply via email to