Through witchcraft and dark magic, Zig contains a C standard library and cross compiler for every architecture in 45 megabytes.

  • prcrst@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    1 year ago

    Very interesting. Cross compilation is always daunting.

    I’ll just throw zig on the ever growing list of ‘things to take a look at’

  • mint_tamas@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    2
    ·
    1 year ago

    “Clang and GCC cannot do this” this is such a dishonest claim. A certain clang distribution he tried “couldn’t do it”, but that does not mean that clang in general can’t cross-compile. In fact, the reason zig can is LLVM itself. You can build a custom distribution with all your favorite targets from clang (just like you can build a whole compiler for a new language).