-
Notifications
You must be signed in to change notification settings - Fork 26
Update to LDK 0.1.2 #172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Update to LDK 0.1.2 #172
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rust's memory allocator doesn't allocate for 0-byte allocations. However, standard `libc` does. As a result, Rust also doesn't free 0-byte allocations whereas `libc`-based C code will rely on such allocation being free'd. This breaks our bindings somewhat as we may allocate for 0-byte strings or arrays, but once we pass them to Rust they will not be freed. Here we skip such allocations when we pass strings to Rust, avoiding leaks when empty strings are passed.
Rust's memory allocator doesn't allocate for 0-byte allocations. However, standard `libc` does. As a result, Rust also doesn't free 0-byte allocations whereas `libc`-based C code will rely on such allocation being free'd. This breaks our bindings somewhat as we may allocate for 0-byte strings or arrays, but once we pass them to Rust they will not be freed. Here we skip such allocations when we pass byte arrays (in the form of u8-vecs, as well as a few other types), avoiding leaks when empty arrays are passed.
Now that the bindings use a real `Address` type instead of a string we need to have a class for it in our languages.
Most of our conversion was originally written for Java, where there are no unsigned integers, but now that we're also targeting TypeScript with strongly-typed arrays we should actually track signed and unsigned integers as separate types. Note that this will let us use `*IntArray` types more in TypeScript giving our users additional type information.
This should resolve build errors when using .NET 9.0 due to conflicts between our `UInt128` type and `System.UInt128`.
This should allow tests to be built targeting .NET 9.0
Newer .NET runtimes allow it to throw `ThreadInterruptedException` which can cause our tests to fail.
Modern NDK no longer ships a `$TARGET-strip` binary, but does ship `llvm-strip`, which seems to imply they'd prefer that be used. Thus, we hard-code `llvm-strip` in `android-build.sh`
This allows our own code to do things like `(a instanceof Option_ThingZ_Some)`, though it doesn't impact the public API.
`NetworkGraph` now pre-allocates the appropriate size, which causes our tests to use a bit more than 1GB in memory, so we simply turn off the limit.
While some of our determinism checks fail for trivial cases (specifically for macOS and Windows builds), we still want CI jobs to fail to ensure they get manual verification.
Collaborator
Author
|
CI determinism "passed" at https://github.com/TheBlueMatt/ldk-garbagecollected/actions/workflows/build.yml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.