How to get artifactbundles working on Windows

Hi,

I am new to Swift and I am trying to add support for Windows to SwfitSDL. I figured the best way would be to add Windows support via an artifactbundle that way the Windows binary can be stored elsewhere and downloaded as part of the package when built (if I understand artifactbundles correctly).

But I seem to be failing at the first hurdle. I've stored a build of SDL locally in the dependency folder under SDL3-Windows.artifactbundle with an info.json that describes the artifact for Windows. I then added it to the Package.swift file as a binary target, but not add it as a dependency to anything else, and I get an SDL3-Windows.artifactbundle does not contain a binary artifact error.

I'm like 99% certain the names of the folders are correct, so I am not certain why it can't find the SDL.dll I put in there. Any assistance would be appreciated.

// Tree of my dependency folder
C:\Dev\SwiftSDL\Dependencies\SDL3-Windows.artifactbundle
│   info.json
│
└───sdl3-windows-msvc
    │   module.modulemap
    │
    ├───bin
    │       SDL3.dll
    │
    ├───include
    │   └───SDL3
    │           SDL.h
    │           // other headers
    │
    └───lib
        │   SDL3.lib
        │   SDL3_test.lib
        │
        └───pkgconfig
                sdl3.pc

And the additional binary target added to the Package.swift

    .binaryTarget(
      name: "CSDL3Windows",
      path: "Dependencies/SDL3-Windows.artifactbundle"
    ),

You seem to intend to support dynamic libraries on Windows via artifact bundles; however, according to the description in SE-0482 , dynamic library support does not appear to be included.

Technially, yes. But on Windows at least when you compile a shared library anything that is marked as dllexport (or everything if you use the right compiler flags) is stubbed into a .lib that you link against instead and it handles everything inside the .lib. I would hope that circumvents the dynamic library limitations

Okay, so the error message was actually misleading. It had nothing to do with the binary target and instead was to do with the fact that the schemaVersion in the info.json was incorrect