Skip to content

Commit f6a564c

Browse files
committed
Update README to remove stale build instructions, mention C#
1 parent dc9e810 commit f6a564c

File tree

1 file changed

+10
-28
lines changed

1 file changed

+10
-28
lines changed

README.md

+10-28
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
LDK Java and TypeScript Bindings
2-
================================
1+
LDK Java, C#, and TypeScript Bindings
2+
=====================================
33

4-
This repo contains an autogeneration system to generate LDK bindings for garbage-collected languages, currently including Java and TypeScript. See below for the current status of the bindings.
4+
This repo contains an autogeneration system to generate LDK bindings for garbage-collected languages, currently including Java, C#, and TypeScript. See below for the current status of the bindings.
55

66
The auto-generated code contains copies of the Rust documentation, which can also be viewed at
77
[docs.rs/lightning](https://docs.rs/lightning). High-level documentation of the API can be found at
@@ -10,31 +10,13 @@ The auto-generated code contains copies of the Rust documentation, which can als
1010
Building
1111
========
1212

13-
A release build of the Java bindings library for Linux is available in git. Thus, the bindings should work as long as the `LD_LIBRARY_PATH` includes the top-level directory of this repository.
14-
15-
To build the bindings locally, the bindings require some additional work which is still making its
16-
way upstream, for now it should be built against the
17-
[rust-lightning 2022-10-112-java-bindings branch on git.bitcoin.ninja](https://git.bitcoin.ninja/?p=rust-lightning;a=shortlog;h=refs/heads/2022-10-112-java-bindings).
18-
Check that branch out locally as well as [ldk-c-bindings](https://github.com/lightningdevkit/ldk-c-bindings)
19-
and run the `genbindings.sh` script in ldk-c-bindings to build the required binaries. Thereafter,
20-
in this repo, run the `genbindings.sh` script with the first argument pointing to the ldk-c-bindings
21-
directory, the second the relevant JNI CFLAGS, the third argument set to `true` or `false` to
22-
indicate whether building in debug mode, and the third set to true or false to indicate if the
23-
bindings should be built with workarounds required for Android. JNI CFLAGS on debian are likely
24-
"-I/usr/lib/jvm/java-11-openjdk-amd64/include/ -I/usr/lib/jvm/java-11-openjdk-amd64/include/linux/".
25-
When running a program linking against the library in debug mode, LD_PRELOAD should likely include
26-
the relevant `libclang_rt.asan-platform.so` path.
27-
28-
Note that building with address sanitizer is only supported on MacOS with upstream clang (ie where
29-
the LLVM version in use matches the LLVM version against which rustc was built), not with Apple clang.
30-
Builds with Apple clang will work fine, but largely only be useful in a release context.
31-
To build on Mac with address sanitizer, you will need to run `ldk-c-bindings`' `genbindings.sh`
32-
script with upstream clang in your PATH and likely replace your $JAVA_HOME/bin/java with a simple
33-
wrapper which calls java after an export like:
34-
`export DYLD_INSERT_LIBRARIES=/path/to/upstream/llvm/lib/clang/12.0.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib`
35-
36-
To build for Apple M1 (ie aarch64-apple-darwin), you probably want something like
37-
`CC="clang --target=aarch64-apple-darwin" LDK_TARGET=aarch64-apple-darwin LDK_TARGET_CPU=generic ./genbindings.sh ...`
13+
The releases for Java, C#, and TypeScript are all deterministic. You should be able to reproduce
14+
the release binaries identically by running the scripts run in CI, see
15+
[.github/workflows/build.yml](.github/workflows/build.yml).
16+
17+
Releases for all platforma re built on Linux as that is the easiest way to get things
18+
deterministic, however building on macOS should also work. Building on Windows is not currently
19+
supported.
3820

3921
Status
4022
======

0 commit comments

Comments
 (0)