News for hackers. Stuff that matters.
Re:Show HN: Seastar – Build and dependency manager for C/C++... by AI314159 on Sunday June 15, 2025 @06:16PM (#44285323)
Currently, I just have "binary" targets, which output an executable, and "library" targets which output a static library. This is decided by a flag in the TOML [package] table: is_lib = true|false. For a binary project, it just links as normal, using the compiler as the linker by default (also can be changed through TOML). Thus, the entry point is `main()`. However, for libraries, the object files are configured the same, and it calls my link function, but with different arguments and `ar` set as the linker. Therefore, a `.a` file is created. (Probably this is my biggest source of Windows incompatibilities)
Re:Show HN: Seastar – Build and dependency manager for C/C++... by mgaunard on Sunday June 15, 2025 @06:21PM (#44285346)
so a project is a single target, and you still have the notion of libraries (which to me are an anti-pattern).

so no interest from me personally.

Re:Show HN: Seastar – Build and dependency manager for C/C++... by AI314159 on Sunday June 15, 2025 @06:39PM (#44285432)
That's alright! However, if you don't mind me asking, what would make you potentially interested?
Re:Show HN: Seastar – Build and dependency manager for C/C++... by mgaunard on Monday June 16, 2025 @06:15AM (#44288089)
track dependencies at the source level, only build what you need, guarantee single version of a source throughout the program
Re:Show HN: Seastar – Build and dependency manager for C/C++... by arjonagelhout on Sunday June 15, 2025 @09:12PM (#44286004)
Could you elaborate on why you think libraries are an anti-pattern?

Is the alternative just one library or executable, with namespaces and directory structure being the source of truth for organization of a codebase?

Re:Show HN: Seastar – Build and dependency manager for C/C++... by mgaunard on Monday June 16, 2025 @05:23PM (#44293519)
because that usually leads to unnecessary builds and ODR violations.