Skip to content
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

fix: cbindgen fix #4298

Merged
merged 1 commit into from
Jul 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion base_layer/wallet_ffi/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

use std::{env, path::PathBuf};

use cbindgen::{Config, Language, ParseConfig, Style};
use cbindgen::{Config, ExportConfig, Language, ParseConfig, Style};

fn main() {
let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
Expand All @@ -28,6 +28,10 @@ fn main() {
autogen_warning: Some("// This file was generated by cargo-bindgen. Please do not edit manually.".to_string()),
style: Style::Tag,
cpp_compat: true,
export: ExportConfig {
include: vec!["TariUtxo".to_string()],
..Default::default()
},
..Default::default()
};

Expand Down
8 changes: 8 additions & 0 deletions base_layer/wallet_ffi/wallet.h
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,14 @@ typedef struct FeePerGramStatsResponse TariFeePerGramStats;

typedef struct FeePerGramStat TariFeePerGramStat;

struct TariUtxo {
const char *commitment;
uint64_t value;
uint64_t mined_height;
uint64_t mined_timestamp;
uint8_t status;
};

#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
Expand Down