Check out Zig: in less than 50 MB, it supports cross-compiling on any major os/arch for any other major os/arch, and it compiles most plain C code, and it includes libc headers for linux/mac/windows.
50 million bytes is really a lot of bytes, it's just that everyone has become accustomed to orders-of-magnitude bloat, and doesn't realize the 100x duplication and inefficiency which sneaks into just about every part of computing where it can get away with it.
This appears to just be a programming language with very limited frameworks compared to those provided by Android and iOS. For example, where are the GUI toolkits, audio toolkits, robust storage frameworks, 3D capabilities, etc? This doesn't seem like an accurate comparison at all. Sure, you can get down to 50MB if you throw out all the features.
... 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.
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.
https://ziglang.org/download/ https://ziglang.org/#Cross-compiling-is-a-first-class-use-ca...
50 million bytes is really a lot of bytes, it's just that everyone has become accustomed to orders-of-magnitude bloat, and doesn't realize the 100x duplication and inefficiency which sneaks into just about every part of computing where it can get away with it.