4 ms·
I am working with zig for embed code and it works well. It's mental model is easier than rust and it's easy to use static memory with std lib. Also I had a pro
by kuon 4y ago
I am working with zig for embed code and it works well. It's mental model is easier than rust and it's easy to use static memory with std lib.
Also I had a project where I could not get cross compilation to work and compiling on the system itself was too slow in rust.
As I said earlier, both language can thrive and they both have a place in my toolbox.
- SV_BubbleTime 4y agoHow is it looking on embedded? The real make or break for me is debugging / GDB. I’ve assumed that a debugger will be able to point to and step around native Zig code, now or eventually. But I wonder how it would work with C code you bring in? If that could be debugged seamlessly along with Zig code, that would really be something.
- flohofwoe 4y agoCan't speak specifically for the embedded use case, but when debugging my mixed Zig/C/C++ projects in VSCode with CodeLLDB or the MS C/C++ extensions (which are frontends for gdc and lldb on Mac and Linux) I can just step from Zig code into C code and back (the same works for other compiled languages that support DWARF debug output btw, there are no 'language barriers' in the debugger).
- SV_BubbleTime 4y agoWell that sounds like the dream! I haven’t used CodeLLDB, but if it’s GDB access and display is as good as what I get with STM32CubeIDE (Eclipse + CDT) then it really sounds like it’s getting there.
- kuon 4y agoIt works but there are still some progress to be made, especially on low memory chip when some vars gets optimized out and you cannot inspect them without GDB jutsu involving manual address. Navigating source alongside C works fine.