4 ms·
> It would really be a better approach to work on getting Rust to adopt the features of Zig you're looking for. I was just pondering the other day about how ni
by cmrdporcupine 3y ago
> It would really be a better approach to work on getting Rust to adopt the features of Zig you're looking for.
I was just pondering the other day about how nice it would be to take to get the same level of quality C/C++ integration that Zig has, but in Rust. My new job has acres and acres of C++ which isn't going to go away. Linking and wrapping against C++ is one thing; build system integration is another. Zig has some serious advantages there.
That and I really want allocator_api and simd to get into stable.
- Ygg2 3y agoI'm not familiar with Rust vs Zig C++ integration. What are the stumbling blocks? Lack of stable ABI in Rust?
- cmrdporcupine 3y agoI don't have much Zig experience at all, but from what I've read Zig is pretty genius because in addition to being a Zig compiler -- with its own sane build system -- the same tool also acts as a C/C++ compiler. So mixing Zig and C/C++ has a lot less friction.
- estebank 3y agoWhat are the limitations you encounter with cxx and auto-cxx?
- steveklabnik 3y agoThey're totally orthogonal from the huge win here, which is how zig cc embeds clang, includes libc headers, etc.
- Yoric 3y agoI seem to remember a Rust toolchain that actually uses Zig as its cross-compiler (I think). Would that help?