Package.swift 1.3 KB

123456789101112131415161718192021222324252627282930
  1. // swift-tools-version:6.1
  2. // The swift-tools-version declares the minimum version of Swift required to build this package.
  3. import PackageDescription
  4. let package = Package(
  5. name: "server",
  6. platforms: [.macOS(.v14)],
  7. dependencies: [
  8. .package(url: "https://github.com/hummingbird-project/hummingbird.git", from: "2.16.0"),
  9. .package(url: "https://github.com/hummingbird-project/swift-mustache.git", from: "2.0.0"),
  10. .package(url: "https://github.com/vapor/postgres-nio.git", from: "1.21.0"),
  11. ],
  12. targets: [
  13. .executableTarget(
  14. name: "server",
  15. dependencies: [
  16. .product(name: "Hummingbird", package: "hummingbird"),
  17. .product(name: "Mustache", package: "swift-mustache"),
  18. .product(name: "PostgresNIO", package: "postgres-nio"),
  19. ],
  20. swiftSettings: [
  21. // Enable better optimizations when building in Release configuration. Despite the use of
  22. // the `.unsafeFlags` construct required by SwiftPM, this flag is recommended for Release
  23. // builds. See <https://github.com/swift-server/guides#building-for-production> for details.
  24. .unsafeFlags(["-cross-module-optimization"], .when(configuration: .release))
  25. ]
  26. )
  27. ]
  28. )