Skip to content

Add Swift bindings source#52

Merged
benthecarman merged 1 commit intolightningdevkit:masterfrom
damus-io:gh-51
Mar 25, 2026
Merged

Add Swift bindings source#52
benthecarman merged 1 commit intolightningdevkit:masterfrom
damus-io:gh-51

Conversation

@danieldaquino
Copy link
Collaborator

@danieldaquino danieldaquino commented Mar 25, 2026

Summary

This PR addresses the issue at #51, by adding the missing generated Swift bindings source file.

This file was generated using the instructions outlined here: https://github.com/lightningdevkit/orange-sdk/blob/master/SWIFT.md#generating-swift-bindings

(If it makes it easier to review, the reviewer can generate that file locally and diff against this PR)

Issue repro

Swift:

% swift --version
swift-driver version: 1.127.15 Apple Swift version 6.2.4 (swiftlang-6.2.4.1.4 clang-1700.6.4.2)
Target: arm64-apple-macosx26.0

OS: macOS 26
Orange SDK: 34367b6
Setup: Using a local clone of the repo for testing purposes
Steps:

  1. Create a new empty Swift package:
mkdir orange-sdk-client-test
cd orange-sdk-client-test
git init
swift package init
git add --all
git commit -m "Initial commit"
  1. Add the local Orange SDK clone as a dependency. Here is the Package.swift:
// swift-tools-version: 6.2
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
    name: "orange-sdk-client-test",
    products: [
        // Products define the executables and libraries a package produces, making them visible to other packages.
        .library(
            name: "orange-sdk-client-test",
            targets: ["orange-sdk-client-test"]
        ),
    ],
    dependencies: [
        .package(path: "../orange-sdk")
    ],
    targets: [
        // Targets are the basic building blocks of a package, defining a module or a test suite.
        // Targets can depend on other targets in this package and products from dependencies.
        .target(
            name: "orange-sdk-client-test"
        ),
        .testTarget(
            name: "orange-sdk-client-testTests",
            dependencies: ["orange-sdk-client-test"]
        ),
    ]
)
  1. Build

Results

Fails with the same error as reported in the original ticket:

% swift build
error: 'orange-sdk': invalid custom path 'bindings/swift/Sources/OrangeSDK' for target 'OrangeSDK'

Testing

Swift:

% swift --version
swift-driver version: 1.127.15 Apple Swift version 6.2.4 (swiftlang-6.2.4.1.4 clang-1700.6.4.2)
Target: arm64-apple-macosx26.0

OS: macOS 26
Orange SDK: 078333e

Steps: Same as listed in the Issue reproduction section above

Results

Reported error no longer appears:

% swift build
warning: 'orange-sdk-client-test': dependency 'orange-sdk' is not used by any target
[1/1] Planning build
Building for debugging...
[1/1] Write swift-version--58304C5D6DBC2206.txt
Build complete! (0.20s)

@benthecarman
Copy link
Collaborator

thanks! sorry about this, was never sure which files are build artifacts and which are needed for bindings

@benthecarman benthecarman merged commit 2762df2 into lightningdevkit:master Mar 25, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants