After a half-hour of googling, I haven't been able to find a good answer. Is there any way to make an SPM project with a main.swift
file entry point execute in a concurrent/async context? I can do it with something like this:
AppMain.swift:
@main
struct
AppMain
{
static
func
main()
async
throws
{
try await someTask()
}
}
But I'd like to do it like this:
main.swift:
try await someTask()
(Swift doesn't allow the presence of @main
and a main.swift
in the target.)