Windows is maturing, but there is a still a long path to get to the point where we should start thinking about ABI stability. Similar to how Apple platforms prior to ABI stability, Windows will require shipping the runtime as part of application distributions for some time.
There have been previous threads on the forums about the difficulty about the packaging.
A discussion with @etcwilde about Windows made me realise that one piece that we are currently missing in the toolchain installation is a MSM for the runtime. This is something Visual Studio already does for the redistributable (though it is deprecated as it simplifies updates with versioning).
I was curious if people who may be interested in distributing the redistributable, would it be more convenient to have the redistributable available as a MSM or a MSI? The latter would always require that the application redistribution is in a bundle to install the chain for the dependency (similar to the installer.exe for the Swift toolchain).
Of course, it is possible to package both. The question is more about value for the size increase. One thing that I have wanted to accomplish for a while is to change the Windows toolchain installer to have 2 variants:
- offline installation: the current installer - bundled MSIs
- online installation: a variant where the installer.exe is tiny (~1MiB) and dynamically fetches the MSIs that are required.
The latter is something that there is some work in progress that will make that more reasonable to accomplish. The current ongoing refactoring in the installer should allow some more control over the installed components. I know that others may be curious about some of the desired restructuring:
- "Compilers"
- clang
- swift
- binutils
- linkers
- Debugger & REPL
- lldb
- Swift REPL
- Command Line tools
- SPM
- clang-format
- swift-format
- swift-inspect
- IDE tools
- clangd
- SourcKit-LSP
- LLDB VSCode Plugin
- SDKs
- Windows AMD64
- Windows ARM
- Windows ARM64
- Windows x86
- Runtime
- Windows AMD64
- Windows ARM
- Windows ARM64
- Windows x86
- Redistributables
- Windows AMD64
- Windows ARM
- Windows ARM64
- Windows x86
*
A note on the grouping here. I think that the SDK, Runtime, Redistrbutable should be the only categories that give any control over the sub-components. The remainders would be all or nothing. The runtime for the host would not be possible to unselect of course (which would be one of AMD64 or ARM64, as there is no intention to support a 32-bit toolchain).
While it may logically make some sense to split out the binutils from the rest of the toolchain, it might help with compression to keep it bundled. This should allow finer grained control for installation for development vs CI usage. It would be interesting to hear if there are use cases that would be better served by further restructuring the top-level components to allow us to have the necessary control for the use of the installer in various cases.