Hacker News new | ask | show | jobs
by ploxiln 2212 days ago
... because it was claimed that the IDEs are many gigabytes because they "let you target multiple OS versions". Well, you can get the required essence for targeting multiple operating systems and architectures in 50 MB. If a "proper IDE" for a single OS/arch/platform is 500 MB, then one for "multiple" could be about 550 MB. So how does it get up to 5 GB or more? Convenience and junk.
1 comments

Just because Zig can compile for multiple platforms, doesn't mean it can target those platforms like those IDEs could.

For example, with Visual Studio, a large part of the installation footprint are the various SDKs you need to actually build a realistic Windows application (that interacts with the OS, maybe does some COM stuff, brings up a GUI, uses networking..etc) There are also multiple versions of these SDKs, especially the Windows SDKs. Visual Studio also supports a lot of languages, and for some of these languages, there is support going back to very old versions and tech stacks. You can still build Windows XP compatible applications in modern Visual Studio versions.

Can Zig talk to COM? Can it set up a DXGI swap chain? Can I pop up notification toasts as simple as calling one function? How do you package Zig apps for the Microsoft Store?

So yes, you can compile Zig programs for multiple platforms, and these can run on those platforms. But once you start getting into actually interacting with those platforms, you will need all those things you call convenience and junk. Libc is just a fraction of what you need to make applications for a platform.