fix: rm comments, add cpp_compat to cbindgen

This commit is contained in:
erhant 2026-06-23 10:45:13 +03:00
parent c57bf16d15
commit 0bb7b30d63
3 changed files with 9 additions and 3 deletions

View File

@ -7,15 +7,12 @@ version = "0.1.0"
[dependencies] [dependencies]
lee.workspace = true lee.workspace = true
indexer_core.workspace = true indexer_core.workspace = true
# `convert` brings in the LEE <-> protocol `From`/`TryFrom` impls the query
# marshalling relies on (previously pulled in transitively via `indexer_service`).
indexer_service_protocol = { workspace = true, features = ["convert"] } indexer_service_protocol = { workspace = true, features = ["convert"] }
env_logger.workspace = true env_logger.workspace = true
log = { workspace = true } log = { workspace = true }
tokio = { features = ["rt-multi-thread"], workspace = true } tokio = { features = ["rt-multi-thread"], workspace = true }
futures.workspace = true futures.workspace = true
# Serializes the indexer status snapshot to JSON for `query_status`.
serde_json.workspace = true serde_json.workspace = true
[build-dependencies] [build-dependencies]

View File

@ -6,6 +6,7 @@ fn main() {
cbindgen::Builder::new() cbindgen::Builder::new()
.with_crate(crate_dir) .with_crate(crate_dir)
.with_language(cbindgen::Language::C) .with_language(cbindgen::Language::C)
.with_cpp_compat(true)
.with_pragma_once(true) .with_pragma_once(true)
.generate() .generate()
.expect("Unable to generate bindings") .expect("Unable to generate bindings")

View File

@ -407,6 +407,10 @@ typedef struct PointerResult_FfiVec_FfiTransaction_____OperationStatus {
enum OperationStatus error; enum OperationStatus error;
} PointerResult_FfiVec_FfiTransaction_____OperationStatus; } PointerResult_FfiVec_FfiTransaction_____OperationStatus;
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
/** /**
* Creates and starts an indexer based on the provided * Creates and starts an indexer based on the provided
* configuration file path. * configuration file path.
@ -804,3 +808,7 @@ void free_ffi_transaction_vec(struct FfiVec_FfiTransaction *val);
bool is_ok(const enum OperationStatus *self); bool is_ok(const enum OperationStatus *self);
bool is_error(const enum OperationStatus *self); bool is_error(const enum OperationStatus *self);
#ifdef __cplusplus
} // extern "C"
#endif // __cplusplus