Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

From the `zig build-exe` help menu:

    Supported file types:
                      .zig    Zig source code
                        .o    ELF object file
                        .o    Mach-O (macOS) object file
                        .o    WebAssembly object file
                      .obj    COFF (Windows) object file
                      .lib    COFF (Windows) static library
                        .a    ELF static library
                        .a    Mach-O (macOS) static library
                        .a    WebAssembly static library
                       .so    ELF shared object (dynamic link)
                      .dll    Windows Dynamic Link Library
                    .dylib    Mach-O (macOS) dynamic library
                      .tbd    (macOS) text-based dylib definition
                        .s    Target-specific assembly source code
                        .S    Assembly with C preprocessor (requires LLVM extensions)
                        .c    C source code (requires LLVM extensions)
    .cxx .cc .C .cpp .stub    C++ source code (requires LLVM extensions)
                        .m    Objective-C source code (requires LLVM extensions)
                       .mm    Objective-C++ source code (requires LLVM extensions)
                       .bc    LLVM IR Module (requires LLVM extensions)
                       .cu    Cuda source code (requires LLVM extensions)


Ah! thanks, I'd been using 'zig --help build-obj' vs 'zig build-obj -h'.

And just to say the WebAssembly support is amazing, well done and thanks!




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: