Skip to content

Vcpkg integration #15798

Open
Open
@HertzDevil

Description

@HertzDevil

The biggest advantage of MinGW-w64 Crystal over the MSVC-based equivalent is that a wide selection of third-party libraries' development files are available via Pacman, the package manager for MSYS2, and that pkg-config works out of the box there. In contrast, the MSVC package is designed to be as minimal as possible; gathering libraries becomes much more convoluted, since WinGet does not offer them, and no one would really set up pkg-config manually for MSVC. Sometimes, though, you just have to use the MSVC toolchain for whatever reasons.

So I wonder if there is an equally minimal development library package manager, and it looks like Vcpkg would fill that spot. It can be installed portably, requires only MSVC to work (actually CMake too, but I believe Vcpkg will create its own installation locally), and supports Ports-like local rebuilds. Having the compiler look up library paths and linker flags automatically using Vcpkg would greatly improve the developer experience when using the MSVC toolchain.

Currently this is just a preliminary thought and I haven't tinkered with the compiler yet. At a minimum, @[Link] might accept a new vcpkg: argument, because the library name need not be identical to the pkg-config one. Also Vcpkg itself is cross-platform, and might conflict with pkg-config on Linux or macOS. https://github.com/dsisnero/vcpkg-cr could be a good starting point.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    To investigate

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions