Skip to content

Commit 7d32f5b

Browse files
committed
f readme - note allocation requirements for template types
1 parent acc37cf commit 7d32f5b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lightning-c-bindings/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,12 @@ All of the Rust-Lightning types are mapped into C equivalents which take a few f
9494
MUST_USE_RES LDKCResult_NoneAPIErrorZ ChannelManager_create_channel(const LDKChannelManager *this_arg, ..., LDKUserConfig override_config);
9595
```
9696

97+
* Various containers (Tuples, Vecs, Results, etc) are mapped into C structs of the form
98+
LDKCContainerType_ContainerElementsZ. Inner fields are often pointers, and in the case of
99+
primitive types, these may be allocated in C using the system allocator. See [the Rust docs on
100+
your platform's default System allocator](https://doc.rust-lang.org/std/alloc/struct.System.html)
101+
for which allocator you must use.
102+
97103
As the bindings are auto-generated, the best resource for documentation on them is the native Rust
98104
docs available via `cargo doc` or [docs.rs/lightning](https://docs.rs/lightning).
99105

0 commit comments

Comments
 (0)