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
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ jobs:
profile: minimal
- name: Build on Rust ${{ matrix.toolchain }}
run: cargo build --verbose --color always
- name: Check formatting
- name: Check release build on Rust ${{ matrix.toolchain }}
run: cargo check --release --verbose --color always
- name: Check formatting on Rust ${{ matrix.toolchain }}
if: matrix.check-fmt
run: rustup component add rustfmt && cargo fmt --all -- --check
- name: Test on Rust ${{ matrix.toolchain }}
Expand Down
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,19 @@ Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

# Ignore generated swift related files
.swiftpm/
ldk_nodeFFI.*
ldk_node.swift
libldk_node.dylib
LightningDevKitNode.swift
ldk_node.swiftmodule
swift.swiftsourceinfo
swift.abi.json
swift.swiftdoc

# Ignore ldk_nodeFFI.xcframework files
/bindings/swift/ldk_nodeFFI.xcframework
/bindings/kotlin/ldk-node-android/lib/src/main/jniLibs
/bindings/kotlin/ldk-node-android/lib/src/main/kotlin/org/lightningdevkit/ldknode/ldk_node.kt
21 changes: 21 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,22 @@ categories = ["cryptography::cryptocurrencies"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[lib]
crate-type = ["staticlib", "cdylib"]
name = "ldk_node"

[[bin]]
name = "uniffi-bindgen"
path = "uniffi-bindgen.rs"

[profile.release-smaller]
inherits = "release"
opt-level = 'z' # Optimize for size.
lto = true # Enable Link Time Optimization
codegen-units = 1 # Reduce number of codegen units to increase optimizations.
panic = 'abort' # Abort on panic
strip = true # Strip symbols from binary*

[dependencies]
lightning = { version = "0.0.115", features = ["max_level_trace", "std"] }
lightning-invoice = { version = "0.23" }
Expand Down Expand Up @@ -51,13 +67,18 @@ serde_json = { version = "1.0" }
tokio = { version = "1", default-features = false, features = [ "rt-multi-thread", "time", "sync" ] }
esplora-client = { version = "0.4", default-features = false }
libc = "0.2"
uniffi = { version = "0.23.0", features = ["build"] }

[dev-dependencies]
electrsd = { version = "0.22.0", features = ["legacy", "esplora_a33e97e1", "bitcoind_23_0"] }
electrum-client = "0.12.0"
proptest = "1.0.0"
regex = "1.5.6"

[build-dependencies]
uniffi = { version = "0.23.0", features = ["build", "cli"] }


[profile.release]
panic = "abort"

Expand Down
9 changes: 9 additions & 0 deletions bindings/kotlin/ldk-node-android/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# Linux start script should use lf
/gradlew text eol=lf

# These are Windows script files and should use crlf
*.bat text eol=crlf

5 changes: 5 additions & 0 deletions bindings/kotlin/ldk-node-android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Ignore Gradle project-specific cache directory
.gradle

# Ignore Gradle build output directory
build
17 changes: 17 additions & 0 deletions bindings/kotlin/ldk-node-android/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
buildscript {
repositories {
google()
}
dependencies {
classpath("com.android.tools.build:gradle:7.1.2")
}
}

plugins {
id("io.github.gradle-nexus.publish-plugin") version "1.1.0"
}

// library version is defined in gradle.properties
val libraryVersion: String by project

version = libraryVersion
5 changes: 5 additions & 0 deletions bindings/kotlin/ldk-node-android/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
org.gradle.jvmargs=-Xmx1536m
android.useAndroidX=true
android.enableJetifier=true
kotlin.code.style=official
libraryVersion=0.1
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
244 changes: 244 additions & 0 deletions bindings/kotlin/ldk-node-android/gradlew

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading