Crate ergo

source ·
Expand description

C bindings for ergo-lib

Macros

  • ergo-lib uses a number of collection types that are simple wrappers around Vec. We have a generic type for such a collection in ergo-lib-c-core::collections::Collection. A limitation of cbindgen is that it cannot process generic functions. This macro generates a C-compatible interface for such a collection for any desired type T.
  • Generates an equality function for FFI

Structs

  • Address wrapper
  • Convenience type to allow us to pass Rust bools (with possible error) through FFI to the C side.
  • Convenience type to allow us to pass Rust enums with u8 representation through FFI to the C side.
  • Convenience type to allow us to pass Rust Option<_> types through FFI to C side.
  • Convenience type to allow us to pass Rust CStrings through FFI to C side (as pointers). Note it is the responsibility of the caller to free the Rust CString. For an example, see MnemonicGenerator in the Swift bindings.

Enums

Traits

Functions

Type Aliases