Package.swift 1.4 KB

1234567891011121314151617181920212223242526272829303132
  1. // swift-tools-version:5.10
  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. products: [
  8. .executable(name: "server", targets: ["server"])
  9. ],
  10. dependencies: [
  11. .package(url: "https://github.com/hummingbird-project/hummingbird.git", from: "2.0.0-beta.4"),
  12. .package(url: "https://github.com/hummingbird-project/swift-mustache.git", from: "2.0.0-beta"),
  13. .package(url: "https://github.com/vapor/postgres-nio.git", from: "1.21.0"),
  14. ],
  15. targets: [
  16. .executableTarget(name: "server",
  17. dependencies: [
  18. .product(name: "Hummingbird", package: "hummingbird"),
  19. .product(name: "Mustache", package: "swift-mustache"),
  20. .product(name: "PostgresNIO", package: "postgres-nio"),
  21. ],
  22. swiftSettings: [
  23. // Enable better optimizations when building in Release configuration. Despite the use of
  24. // the `.unsafeFlags` construct required by SwiftPM, this flag is recommended for Release
  25. // builds. See <https://github.com/swift-server/guides#building-for-production> for details.
  26. .unsafeFlags(["-cross-module-optimization"], .when(configuration: .release))
  27. ]
  28. ),
  29. ]
  30. )