Package.swift 1.5 KB

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