Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,16 @@ let package = Package(
], plugins: [.plugin(name: "skipstone", package: "skip")]),
]
)

if Context.environment["SKIP_BRIDGE"] ?? "0" != "0" {
package.dependencies += [.package(url: "https://source.skip.tools/skip-bridge.git", "0.0.0"..<"2.0.0")]
package.targets.forEach({ target in
target.dependencies += [.product(name: "SkipBridge", package: "skip-bridge")]
})
// all library types must be dynamic to support bridging
package.products = package.products.map({ product in
guard let libraryProduct = product as? Product.Library else { return product }
return .library(name: libraryProduct.name, type: .dynamic, targets: libraryProduct.targets)
})
}

2 changes: 2 additions & 0 deletions Sources/SkipScript/JSContext.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Copyright 2023–2025 Skip
// SPDX-License-Identifier: LGPL-3.0-only WITH LGPL-3.0-linking-exception
#if !SKIP_BRIDGE
#if !SKIP
import Foundation
// Non-Skip uses the JavaScriptCore symbols directly
Expand Down Expand Up @@ -1361,3 +1362,4 @@ public let kJSPropertyAttributeDontEnum: JSPropertyAttributes = Int32(1) << 2
public let kJSPropertyAttributeDontDelete: JSPropertyAttributes = Int32(1) << 3

#endif
#endif