]> git.bitcoin.ninja Git - ldk-java/log
ldk-java
22 months agoAdd some additional writing hooks which C# needs
Matt Corallo [Mon, 2 Jan 2023 01:04:45 +0000 (01:04 +0000)]
Add some additional writing hooks which C# needs

22 months ago[Java] Use util method where possible
Matt Corallo [Mon, 2 Jan 2023 00:23:23 +0000 (00:23 +0000)]
[Java] Use util method where possible

22 months ago[Java] Drop unused util methods
Matt Corallo [Thu, 29 Dec 2022 17:20:15 +0000 (17:20 +0000)]
[Java] Drop unused util methods

22 months ago[TS] Support one more call function
Matt Corallo [Tue, 27 Dec 2022 16:50:37 +0000 (16:50 +0000)]
[TS] Support one more call function

22 months agoNew manual U5 (from u5) and Witness types
Matt Corallo [Tue, 27 Dec 2022 16:49:49 +0000 (16:49 +0000)]
New manual U5 (from u5) and Witness types

22 months agoAdd support for U128, passed as [u8; 16] but with human wrappers
Matt Corallo [Tue, 27 Dec 2022 02:02:24 +0000 (02:02 +0000)]
Add support for U128, passed as [u8; 16] but with human wrappers

22 months agoPass array type, not subty to primitive_arr_*_hu for more context
Matt Corallo [Tue, 27 Dec 2022 02:01:40 +0000 (02:01 +0000)]
Pass array type, not subty to primitive_arr_*_hu for more context

22 months agoRemove args_known and fix `(void)` parsing (duh, its no arguments)
Matt Corallo [Mon, 26 Dec 2022 19:32:44 +0000 (19:32 +0000)]
Remove args_known and fix `(void)` parsing (duh, its no arguments)

2 years agoOnly set up `NioPeerHandler` after chain sync completes
Matt Corallo [Tue, 8 Nov 2022 23:48:07 +0000 (23:48 +0000)]
Only set up `NioPeerHandler` after chain sync completes

No peer connections must be made until after `chain_sync_complete`
is called when using the `ChannelManagerConstructor`, so
initializing the `NioPeerHandler` before then just tempts fate and
risks doing Bad Things.

2 years ago[Java] Always log the LDK versions on startup
Matt Corallo [Sat, 29 Oct 2022 23:05:04 +0000 (23:05 +0000)]
[Java] Always log the LDK versions on startup

2 years agoMerge pull request #120 from TheBlueMatt/main v0.0.112.0
Matt Corallo [Fri, 28 Oct 2022 20:44:17 +0000 (20:44 +0000)]
Merge pull request #120 from TheBlueMatt/main

Update to 0.0.112 (with RGS)

2 years agoUpdate CI references to 0.0.112
Matt Corallo [Fri, 28 Oct 2022 03:34:39 +0000 (03:34 +0000)]
Update CI references to 0.0.112

2 years ago[TS] Update auto-generated TS bindings
Matt Corallo [Thu, 27 Oct 2022 18:35:55 +0000 (18:35 +0000)]
[TS] Update auto-generated TS bindings

2 years ago[Java] Update auto-generated Java bindings
Matt Corallo [Thu, 27 Oct 2022 18:21:04 +0000 (18:21 +0000)]
[Java] Update auto-generated Java bindings

2 years ago[TS] Be more aggressive with type checks
Matt Corallo [Fri, 28 Oct 2022 18:30:30 +0000 (18:30 +0000)]
[TS] Be more aggressive with type checks

2 years ago[TS] Apparently `console.log` doesn't actually throw, it just logs
Matt Corallo [Fri, 28 Oct 2022 05:07:00 +0000 (05:07 +0000)]
[TS] Apparently `console.log` doesn't actually throw, it just logs

2 years ago[TS] Update TS Tests to latest upstream API and test OMs
Matt Corallo [Fri, 28 Oct 2022 03:31:01 +0000 (03:31 +0000)]
[TS] Update TS Tests to latest upstream API and test OMs

2 years ago[Java] Update Java Tests to latest upstream API
Matt Corallo [Fri, 28 Oct 2022 03:29:07 +0000 (03:29 +0000)]
[Java] Update Java Tests to latest upstream API

2 years ago[Java] Update ChannelManagerConstructor to latest upstream API
Matt Corallo [Fri, 28 Oct 2022 03:27:37 +0000 (03:27 +0000)]
[Java] Update ChannelManagerConstructor to latest upstream API

2 years ago[TS] Handle nullable arrays and objects in more cases
Matt Corallo [Fri, 28 Oct 2022 18:32:32 +0000 (18:32 +0000)]
[TS] Handle nullable arrays and objects in more cases

2 years ago[Java] Handle nullable arrays
Matt Corallo [Fri, 28 Oct 2022 05:53:01 +0000 (05:53 +0000)]
[Java] Handle nullable arrays

2 years agoHandle optionally-null multi-dimentional arrays with null check
Matt Corallo [Fri, 28 Oct 2022 06:16:23 +0000 (06:16 +0000)]
Handle optionally-null multi-dimentional arrays with null check

2 years ago[TS] Fix calling trait methods which return a simple enum
Matt Corallo [Thu, 27 Oct 2022 05:27:58 +0000 (05:27 +0000)]
[TS] Fix calling trait methods which return a simple enum

2 years ago[Java] Fix calling trait methods which return simple enums from C
Matt Corallo [Thu, 27 Oct 2022 05:26:55 +0000 (05:26 +0000)]
[Java] Fix calling trait methods which return simple enums from C

2 years ago[TS] Test ChannelManager future notify completion
Matt Corallo [Thu, 6 Oct 2022 23:49:59 +0000 (23:49 +0000)]
[TS] Test ChannelManager future notify completion

This is broken upstream in LDK, so needs fixing there.

2 years ago[TS] Update auto-generated bindings (with RGS)
Matt Corallo [Thu, 6 Oct 2022 19:14:57 +0000 (19:14 +0000)]
[TS] Update auto-generated bindings (with RGS)

2 years ago[TS] Correct encodeUint64Array array view length
Matt Corallo [Thu, 6 Oct 2022 19:16:13 +0000 (19:16 +0000)]
[TS] Correct encodeUint64Array array view length

Otherwise the `set` call fails as the array view we've constructed
is only 1 element long.

2 years agoMerge pull request #119 from TheBlueMatt/main v0.0.111.0
Matt Corallo [Mon, 3 Oct 2022 22:28:51 +0000 (22:28 +0000)]
Merge pull request #119 from TheBlueMatt/main

Update to 0.0.111

2 years ago[TS] Update auto-generated TS bindings
Matt Corallo [Fri, 30 Sep 2022 01:04:14 +0000 (01:04 +0000)]
[TS] Update auto-generated TS bindings

2 years ago[Java] Update auto-generated Java files
Matt Corallo [Thu, 29 Sep 2022 23:05:40 +0000 (23:05 +0000)]
[Java] Update auto-generated Java files

2 years ago[TS] Test OnionMessenger in TypeScript tests
Matt Corallo [Mon, 3 Oct 2022 20:33:51 +0000 (20:33 +0000)]
[TS] Test OnionMessenger in TypeScript tests

2 years ago[Java] Update ChannelManagerConstructor and tests to latest API
Matt Corallo [Fri, 30 Sep 2022 01:07:46 +0000 (01:07 +0000)]
[Java] Update ChannelManagerConstructor and tests to latest API

2 years ago[TS] Update typescript tests to latest upstream API
Matt Corallo [Fri, 30 Sep 2022 01:05:59 +0000 (01:05 +0000)]
[TS] Update typescript tests to latest upstream API

2 years agoUpdate CI references to 0.0.111
Matt Corallo [Mon, 3 Oct 2022 21:27:56 +0000 (21:27 +0000)]
Update CI references to 0.0.111

2 years ago[TS] Fix generation for traits that have supertraits
Matt Corallo [Mon, 3 Oct 2022 20:07:28 +0000 (20:07 +0000)]
[TS] Fix generation for traits that have supertraits

When we have a trait with a supertrait, we have to pass both the
main- and super-trait instance indxes through to C so that it can
call both. We failed to do this, missing an argument entirely when
calling the C code.

Instead of trying to allocate a new instance index, we opt to store
instance indexes in trait structs (assuming there is one) and then
reuse the one in the constructed object.

2 years ago[TS] Correct TS call semantics for some function types
Matt Corallo [Sat, 1 Oct 2022 20:31:26 +0000 (20:31 +0000)]
[TS] Correct TS call semantics for some function types

TS functions now all return uint64_t, not uint32_t, for pointers.

2 years agoAllow trait methods to return NULL-able objects
Matt Corallo [Mon, 3 Oct 2022 20:36:31 +0000 (20:36 +0000)]
Allow trait methods to return NULL-able objects

The comment claiming this isn't supported in Java/TS is incorrect -
it works just fine with no further modifications.

2 years agoAdd support for mapping LDKBigEndianScalar manually, ala TxOut
Matt Corallo [Thu, 29 Sep 2022 22:41:08 +0000 (22:41 +0000)]
Add support for mapping LDKBigEndianScalar manually, ala TxOut

2 years agoMerge pull request #117 from TheBlueMatt/2022-08-fix-npe v0.0.110.3
Matt Corallo [Sat, 3 Sep 2022 22:32:32 +0000 (22:32 +0000)]
Merge pull request #117 from TheBlueMatt/2022-08-fix-npe

[TS+Java] Ensure we don't try to add a reference from null.

2 years ago[TS] Update auto-generated file
Matt Corallo [Sat, 3 Sep 2022 20:41:43 +0000 (20:41 +0000)]
[TS] Update auto-generated file

2 years ago[Java] Update auto-generated Java structs
Matt Corallo [Sat, 3 Sep 2022 20:28:21 +0000 (20:28 +0000)]
[Java] Update auto-generated Java structs

2 years ago[TS+Java] Ensure we don't try to add a reference from `null`.
Matt Corallo [Sat, 3 Sep 2022 20:24:10 +0000 (20:24 +0000)]
[TS+Java] Ensure we don't try to add a reference from `null`.

At least in `Event::PaymentPathFailed` if we try to map an event
with no `retry` we'll hit a `NullPointerException` as we'll try to
add a reference from the `null` retry back to the `Event` itself.

The simple fix is to simply exhaustively check for `null` before
adding references everywhere.

2 years agoMerge pull request #116 from TheBlueMatt/main
Matt Corallo [Mon, 15 Aug 2022 17:17:27 +0000 (17:17 +0000)]
Merge pull request #116 from TheBlueMatt/main

Handle socket errors (the same as socket closure)

2 years agoHandle socket errors (the same as socket closure)
Matt Corallo [Mon, 15 Aug 2022 15:24:52 +0000 (15:24 +0000)]
Handle socket errors (the same as socket closure)

`gr0kchain` on Discord reported that not handling "error" causes
us to get unhandled exceptions, so we have to handle it.

2 years agoMerge pull request #115 from TheBlueMatt/main v0.0.110.2
Matt Corallo [Sat, 13 Aug 2022 20:09:26 +0000 (20:09 +0000)]
Merge pull request #115 from TheBlueMatt/main

2 years ago[TS] Update auto-generated TypeScript bindings
Matt Corallo [Sat, 13 Aug 2022 18:54:59 +0000 (18:54 +0000)]
[TS] Update auto-generated TypeScript bindings

2 years ago[Java] Update auto-generated Java bindings
Matt Corallo [Sat, 13 Aug 2022 18:03:00 +0000 (18:03 +0000)]
[Java] Update auto-generated Java bindings

2 years agoAdd test for gossip data fetching
Matt Corallo [Sat, 13 Aug 2022 18:00:47 +0000 (18:00 +0000)]
Add test for gossip data fetching

This tests the changes in  #114 for regression, and failed prior to
 #114.

2 years agoDrop clone on tuple-field-fetching
Matt Corallo [Sat, 13 Aug 2022 01:34:03 +0000 (01:34 +0000)]
Drop clone on tuple-field-fetching

Early in the lifetime of the bindings here tuple-field-fetching
had memory tracking issues which appear to have been solved now.
Thus, we can go ahead and drop the clone, at least for has-inner
types.

Fixes #84.

2 years agoMerge pull request #114 from TheBlueMatt/main
Matt Corallo [Sat, 13 Aug 2022 01:32:07 +0000 (01:32 +0000)]
Merge pull request #114 from TheBlueMatt/main

Change where the opaque struct is_owned bit is stored in pointers

2 years ago[Java] Update auto-generated Java bindings
Matt Corallo [Fri, 12 Aug 2022 23:35:47 +0000 (23:35 +0000)]
[Java] Update auto-generated Java bindings

2 years ago[TS] Update auto-generated TS bindings
Matt Corallo [Fri, 12 Aug 2022 23:18:41 +0000 (23:18 +0000)]
[TS] Update auto-generated TS bindings

2 years agoSwitch 32-bit platforms to using 64-bit "pointers"
Matt Corallo [Fri, 12 Aug 2022 23:08:17 +0000 (23:08 +0000)]
Switch 32-bit platforms to using 64-bit "pointers"

This much more cleanly fixes the issue described in the previous
commit by simply using 64-bit integers to represent pointers on
32-bit platforms, letting us store the required flag bit in the top
32-bits that are always free.

It does, however, imply changing the entire call semantics for
TypeScript to use BigInts for pointers, rather than numbers.

2 years agoChange where the opaque struct is_owned bit is stored in pointers
Matt Corallo [Thu, 11 Aug 2022 21:38:05 +0000 (21:38 +0000)]
Change where the opaque struct is_owned bit is stored in pointers

When we're returning a reference to an opaque struct, we previously
used the LSB to track the is_owned bit. This works for
heap-allocated structs just fine as `malloc` guarantees maximal
(usually 8-byte) alignment for all returned pointers. However, for
opaque structs which are actually a reference to a field in a
larger native Rust struct (eg `NodeId` in
`ChannelDetails_get_node_one`), this may not be the case. This
caused reading off-by-one `NodeId`s.

We fix this by adding a new set of utilities which handle tagging
and un-tagging pointers which are a bit more complicated. One
32-bit platforms, we simply use the low bit but will change that
in the next commit. However, on 64-bit platforms we have to be a
bit more careful. Modern 64-bit platforms, including Android, use
the top bits (8 bits in the case of android) for pointer
authentication. x86_64 sets the top 16 bits to the same value, but
they may be 1s or 0s. Thus, we use (9th bit) ^ (10th bit) as our
tag, assuming that they are always equal.

This isn't the most robust solution, but until there's time to
rewrite all the opaque object handling to fetch java fields from C
this is likely the best we're going to be able to do.

2 years agoMerge pull request #113 from TheBlueMatt/main v0.0.110.1
Matt Corallo [Sat, 6 Aug 2022 00:25:08 +0000 (00:25 +0000)]
Merge pull request #113 from TheBlueMatt/main

Update to latest LDK-C-Bindings and fix assorted TS bugs

2 years ago[Java] Update auto-generated Java bindings with new upstream getters
Matt Corallo [Fri, 5 Aug 2022 21:09:09 +0000 (21:09 +0000)]
[Java] Update auto-generated Java bindings with new upstream getters

2 years ago[TS] Update auto-generated bindings with changes + upstream changes
Matt Corallo [Thu, 4 Aug 2022 22:59:15 +0000 (22:59 +0000)]
[TS] Update auto-generated bindings with changes + upstream changes

2 years ago[TS] Ensure uint64_t arrays are 8-byte aligned by using an 8-byte len
Matt Corallo [Fri, 5 Aug 2022 20:24:46 +0000 (20:24 +0000)]
[TS] Ensure uint64_t arrays are 8-byte aligned by using an 8-byte len

2 years ago[TS] Redo C -> TS call function naming to make it harder to screw up
Matt Corallo [Fri, 5 Aug 2022 19:52:27 +0000 (19:52 +0000)]
[TS] Redo C -> TS call function naming to make it harder to screw up

2 years agoMerge pull request #112 from G8XSU/main
Matt Corallo [Fri, 5 Aug 2022 01:58:27 +0000 (01:58 +0000)]
Merge pull request #112 from G8XSU/main

Use Gnu-sed on macosx if available

2 years ago[TS] Call FinalizationRegistry.register with a unregister token
Matt Corallo [Fri, 5 Aug 2022 01:17:13 +0000 (01:17 +0000)]
[TS] Call FinalizationRegistry.register with a unregister token

We were assuming we could use `unregister` but weren't actually
passing an "unregister token", which causes unregister to not
function properly.

2 years ago[TS] Include substantially larger backtrace in testing
Matt Corallo [Fri, 5 Aug 2022 01:16:33 +0000 (01:16 +0000)]
[TS] Include substantially larger backtrace in testing

2 years ago[TS] Support lock structs by requiring manual free calls
Matt Corallo [Fri, 5 Aug 2022 00:54:08 +0000 (00:54 +0000)]
[TS] Support lock structs by requiring manual free calls

2 years ago[TS] Fix fd_write to match the ABI, quiet environ call logging
Matt Corallo [Thu, 4 Aug 2022 23:36:52 +0000 (23:36 +0000)]
[TS] Fix fd_write to match the ABI, quiet environ call logging

We need to return the bytes written via an extra argument that we
were leaving potentially-uninitialized.

2 years ago[TS] Support mapping returned uint64[]s from rust functions
Matt Corallo [Thu, 4 Aug 2022 22:56:43 +0000 (22:56 +0000)]
[TS] Support mapping returned uint64[]s from rust functions

2 years agoUse Gnu-sed on macosx if available
Gursharan Singh [Thu, 4 Aug 2022 23:19:45 +0000 (16:19 -0700)]
Use Gnu-sed on macosx if available

2 years agoMerge pull request #111 from TheBlueMatt/main
Matt Corallo [Thu, 28 Jul 2022 06:45:08 +0000 (06:45 +0000)]
Merge pull request #111 from TheBlueMatt/main

2 years ago[Java] Add a simple read lock call in HumanObjectPeerTest
Matt Corallo [Thu, 28 Jul 2022 05:40:56 +0000 (05:40 +0000)]
[Java] Add a simple read lock call in HumanObjectPeerTest

2 years ago[Java] Fix undefined behavior in HumanObjectPeerTest
Matt Corallo [Thu, 28 Jul 2022 03:29:27 +0000 (03:29 +0000)]
[Java] Fix undefined behavior in HumanObjectPeerTest

CI somehow convinced the access to custom_messages_to_send to
trigger an `ArrayIndexOutOfBoundsException`, which should not be
possible except in race cases due to threading issues. Adding the
missing synchronized block should address it.

2 years agoMerge pull request #110 from TheBlueMatt/main v0.0.110.0
Matt Corallo [Wed, 27 Jul 2022 23:42:13 +0000 (23:42 +0000)]
Merge pull request #110 from TheBlueMatt/main

Update to LDK 0.0.110

2 years ago[TS] Update auto-generated TS bindings to LDK 0.0.110
Matt Corallo [Wed, 27 Jul 2022 18:14:02 +0000 (18:14 +0000)]
[TS] Update auto-generated TS bindings to LDK 0.0.110

2 years ago[Java] Update auto-generated Java bindings to LDK 0.0.110
Matt Corallo [Wed, 27 Jul 2022 17:16:16 +0000 (17:16 +0000)]
[Java] Update auto-generated Java bindings to LDK 0.0.110

2 years ago[Java] Update tests to latest upstream API
Matt Corallo [Wed, 27 Jul 2022 18:12:37 +0000 (18:12 +0000)]
[Java] Update tests to latest upstream API

2 years agoUpdate CI references to LDK 0.0.110
Matt Corallo [Wed, 27 Jul 2022 17:14:24 +0000 (17:14 +0000)]
Update CI references to LDK 0.0.110

2 years agoMerge pull request #107 from TheBlueMatt/main
Matt Corallo [Sat, 23 Jul 2022 03:51:17 +0000 (03:51 +0000)]
Merge pull request #107 from TheBlueMatt/main

[TS] Properly export unitary enums such that they're in *.d.mjs

2 years ago[TS] Update auto-generated TS bindings
Matt Corallo [Tue, 5 Jul 2022 18:27:11 +0000 (18:27 +0000)]
[TS] Update auto-generated TS bindings

2 years ago[TS] Add a socket handling implementation that uses Node.JS's `net`
Matt Corallo [Fri, 22 Jul 2022 21:13:22 +0000 (21:13 +0000)]
[TS] Add a socket handling implementation that uses Node.JS's `net`

2 years ago[TS] Add additional node API interface bits for net
Matt Corallo [Fri, 22 Jul 2022 21:55:44 +0000 (21:55 +0000)]
[TS] Add additional node API interface bits for net

2 years ago[TS] Add missing space in array length error string
Matt Corallo [Fri, 22 Jul 2022 18:08:49 +0000 (18:08 +0000)]
[TS] Add missing space in array length error string

2 years ago[TS] Properly export unitary enums such that they're in *.d.mjs
Matt Corallo [Tue, 5 Jul 2022 18:18:54 +0000 (18:18 +0000)]
[TS] Properly export unitary enums such that they're in *.d.mjs

Because the `ts/enums/*` files simply re-export from `bindings.mts`
rather than defining the enum from scratch, we have to include docs
and cannot use /* @internal */ on the `bindings.mts` unitary enums.

2 years ago[Java] Strip Java binaries when compiling, not just wasm
Matt Corallo [Tue, 12 Jul 2022 18:49:17 +0000 (18:49 +0000)]
[Java] Strip Java binaries when compiling, not just wasm

2 years agoMerge pull request #109 from dunxen/patch-1
Matt Corallo [Fri, 15 Jul 2022 20:00:05 +0000 (20:00 +0000)]
Merge pull request #109 from dunxen/patch-1

Specify Node version for Wasm BigInt support

2 years agoSpecify Node version for Wasm BigInt support
Duncan Dean [Wed, 13 Jul 2022 13:36:27 +0000 (15:36 +0200)]
Specify Node version for Wasm BigInt support

From Node v15.0, Wasm BigInt support is no longer experimental

See: https://github.com/nodejs/node/commit/ca8f3ef2e5

2 years agoMerge pull request #106 from TheBlueMatt/main v0.0.109.0
Matt Corallo [Fri, 1 Jul 2022 23:46:33 +0000 (16:46 -0700)]
Merge pull request #106 from TheBlueMatt/main

0.0.109.0

2 years agoUpdate CI branches to 0.0.109
Matt Corallo [Fri, 1 Jul 2022 22:07:38 +0000 (22:07 +0000)]
Update CI branches to 0.0.109

2 years ago[TS] Update auto-generated TS bindings
Matt Corallo [Fri, 1 Jul 2022 22:05:45 +0000 (22:05 +0000)]
[TS] Update auto-generated TS bindings

2 years ago[Java] Update auto-generated Java bindings
Matt Corallo [Fri, 1 Jul 2022 21:55:48 +0000 (21:55 +0000)]
[Java] Update auto-generated Java bindings

2 years ago[Java] Update tests to match 0.0.109 API
Matt Corallo [Fri, 1 Jul 2022 21:57:19 +0000 (21:57 +0000)]
[Java] Update tests to match 0.0.109 API

2 years agoMerge pull request #104 from TheBlueMatt/main v0.0.108.1
Matt Corallo [Thu, 30 Jun 2022 21:34:00 +0000 (14:34 -0700)]
Merge pull request #104 from TheBlueMatt/main

Fix TS u64 call semantics (and test it)

2 years ago[TS] Explicitly include `index.d.mts` (and `.mjs`) in package
Matt Corallo [Thu, 30 Jun 2022 19:59:20 +0000 (19:59 +0000)]
[TS] Explicitly include `index.d.mts` (and `.mjs`) in package

As apparently npm doesn't include it just because its listed in
`types`.

2 years ago[TS] Auto-update version in package.json in genbindings.sh
Matt Corallo [Thu, 30 Jun 2022 19:55:19 +0000 (19:55 +0000)]
[TS] Auto-update version in package.json in genbindings.sh

2 years ago[TS] Update auto-generated typescript bindings
Matt Corallo [Thu, 30 Jun 2022 04:18:40 +0000 (04:18 +0000)]
[TS] Update auto-generated typescript bindings

2 years ago[TS] Add a test that uses `PeerManager` to exchange channel open
Matt Corallo [Thu, 30 Jun 2022 04:22:48 +0000 (04:22 +0000)]
[TS] Add a test that uses `PeerManager` to exchange channel open

2 years ago[TS] Fix typo in inconsistent-versions error message
Matt Corallo [Thu, 30 Jun 2022 17:09:52 +0000 (17:09 +0000)]
[TS] Fix typo in inconsistent-versions error message

2 years ago[TS] Free arrays passed as slices from TS -> C -> Rust
Matt Corallo [Thu, 30 Jun 2022 19:00:08 +0000 (19:00 +0000)]
[TS] Free arrays passed as slices from TS -> C -> Rust

2 years ago[TS] Split C -> JS function calls based on u32/u64 parameters/return
Matt Corallo [Thu, 30 Jun 2022 04:19:13 +0000 (04:19 +0000)]
[TS] Split C -> JS function calls based on u32/u64 parameters/return

We were calling all C -> JS functions with u32 parameters and
return types. This is fine for all of our pointers, as well as any
smaller types - u32 always gets mapped to a JavaScript `number`, so
its all consistent.

However, for u64 parameters/returns, we map the values to
JavaScript `bigint`s, which are not compatible with `numbers`, and
the correct type is checked at the FFI when returning or when users
ultimately try to use a passed `bigint` as if it were a `number`.

Thus, we have to split the `js_invoke_function` family by the
parameters and return values, using `u` for u32s and `b` for u64s
to do so.

2 years agoMerge pull request #103 from TheBlueMatt/main v0.0.108.0
Matt Corallo [Wed, 29 Jun 2022 21:03:39 +0000 (14:03 -0700)]
Merge pull request #103 from TheBlueMatt/main

0.0.108.0

2 years agoUpdate CI install to match latest debian bookworm state
Matt Corallo [Wed, 29 Jun 2022 04:20:20 +0000 (04:20 +0000)]
Update CI install to match latest debian bookworm state

2 years agoUpdate CI MacOS clang version to 14.0.5
Matt Corallo [Tue, 28 Jun 2022 22:43:47 +0000 (22:43 +0000)]
Update CI MacOS clang version to 14.0.5

2 years agoUpdate CI cbindgen install script to work with MSRV
Matt Corallo [Tue, 28 Jun 2022 22:05:12 +0000 (22:05 +0000)]
Update CI cbindgen install script to work with MSRV