Skip to content

Commit

Permalink
Merge pull request #12 from kabiroberai/swift-5-9
Browse files Browse the repository at this point in the history
Swift 5.9 Overhaul
  • Loading branch information
kabiroberai authored Sep 22, 2023
2 parents 1783450 + 0e8cd4b commit f181b8f
Show file tree
Hide file tree
Showing 49 changed files with 1,454 additions and 2,763 deletions.

This file was deleted.

40 changes: 0 additions & 40 deletions NodeSwiftHost/Package.swift

This file was deleted.

33 changes: 0 additions & 33 deletions NodeSwiftHost/ctor.c

This file was deleted.

14 changes: 14 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"pins" : [
{
"identity" : "swift-syntax",
"kind" : "remoteSourceControl",
"location" : "https://github.com/apple/swift-syntax.git",
"state" : {
"revision" : "74203046135342e4a4a627476dd6caf8b28fe11b",
"version" : "509.0.0"
}
}
],
"version" : 2
}
33 changes: 27 additions & 6 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// swift-tools-version:5.3
// swift-tools-version:5.9

import PackageDescription
import CompilerPluginSupport
import Foundation

let buildDynamic = ProcessInfo.processInfo.environment["NODE_SWIFT_BUILD_DYNAMIC"] == "1"
Expand All @@ -12,24 +13,44 @@ let baseSwiftSettings: [SwiftSetting] = [

let package = Package(
name: "node-swift",
platforms: [
.macOS(.v10_15), .iOS(.v13),
],
products: [
.library(
name: "NodeAPI",
type: buildDynamic ? .dynamic : nil,
targets: ["NodeAPI"]
)
),
.library(
name: "NodeModuleSupport",
targets: ["NodeModuleSupport"]
),
],
dependencies: [
.package(url: "https://github.com/apple/swift-syntax.git", from: "509.0.0"),
],
dependencies: [],
targets: [
.target(name: "CNodeAPI"),
.macro(
name: "NodeAPIMacros",
dependencies: [
.product(name: "SwiftSyntaxMacros", package: "swift-syntax"),
.product(name: "SwiftCompilerPlugin", package: "swift-syntax"),
],
swiftSettings: baseSwiftSettings
),
.target(
name: "NodeAPI",
dependencies: ["CNodeAPI"],
exclude: ["Sugar.swift.gyb"],
dependencies: ["CNodeAPI", "NodeAPIMacros"],
swiftSettings: baseSwiftSettings + (enableEvolution ? [
.unsafeFlags(["-enable-library-evolution"])
] : [])
)
),
.target(
name: "NodeModuleSupport",
dependencies: ["CNodeAPI"]
),
],
cxxLanguageStandard: .cxx14
)
Loading

0 comments on commit f181b8f

Please sign in to comment.