Hacker News new | past | comments | ask | show | jobs | submit login

> Does it also work with C++?

It wraps clang, so it supports whatever clang supports, C++ included.

> Also, does it also work with build systems like CMake flawlessly?

I haven't personally tried it, but I'd expect that if all else fails you could add a step in build.zig to run CMake and then link against whatever library you just built.




Does this include libc++ (compiled shared library of the STL complete with headers and debug symbols?) Although I hate most parts of the STL I still find myself using some parts of it (std::vector, std::string, <algorithm>, <type_traits>, etc.). Maybe I can link libc++ as an external library but then that's too much busywork needed for Zig to be a complete C++ dev environment out-of-the-box.


As an experiment a while back, I had tried in on a small project of mine that uses std::vector, std::string, and <algorithm> (though not a whole lot else). It built, ran, and passed my test suite.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: