Remix.run Logo
tonetegeatinst 3 days ago

As far as my understanding of zig goes....it can compile into C....so if you really want secure C code you can compile zig into C?

dayvster 3 days ago | parent | next [-]

Not quite, it can translate C into zig using the `translate-c` command that it comes with. But it compiles directly into machine code

osmsucks 3 days ago | parent [-]

There is a C backend, so you can also compile Zig into C if you want.

dayvster 3 days ago | parent [-]

yea but, that's extremely edge case, or at least I have not yet encountered a need for that personally.

Ar-Curunir 3 days ago | parent | prev | next [-]

While Zig prevents certain kinds of memory safety issues that C does not, it still suffers from memory-safety issues not found in safe Rust.

Cloudef 3 days ago | parent | prev [-]

Zig can compile into C, but it's not portable C