Skip to content
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ rust-dashcore is a Rust implementation of the Dash cryptocurrency protocol libra

### Network & SPV
- `dash-network/` - Network protocol abstractions
- `dash-network-ffi/` - Network FFI bindings using UniFFI
- `dash-network-ffi/` - C-compatible FFI bindings for network types
- `dash-spv/` - SPV client implementation
- `dash-spv-ffi/` - C-compatible FFI bindings for SPV client

### Wallet & Keys
- `key-wallet/` - HD wallet implementation
- `key-wallet-ffi/` - FFI bindings for wallet functionality
- `key-wallet-ffi/` - C-compatible FFI bindings for wallet functionality

### RPC & Integration
- `rpc-client/` - JSON-RPC client for Dash Core nodes
Expand Down
7 changes: 0 additions & 7 deletions dash-network-ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,12 @@ readme = "README.md"

[dependencies]
dash-network = { path = "../dash-network", default-features = false }
uniffi = { version = "0.29.3", features = ["cli"] }
thiserror = "2.0.12"

[build-dependencies]
uniffi = { version = "0.29.3", features = ["build"] }

[dev-dependencies]
hex = "0.4"

[lib]
crate-type = ["cdylib", "staticlib"]
name = "dash_network_ffi"

[[bin]]
name = "uniffi-bindgen"
path = "uniffi-bindgen.rs"
14 changes: 2 additions & 12 deletions dash-network-ffi/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# dash-network-ffi

FFI bindings for the dash-network crate, providing language bindings via UniFFI.
FFI bindings for the dash-network crate, providing C-compatible language bindings.

## Overview

This crate provides Foreign Function Interface (FFI) bindings for the `dash-network` types, allowing them to be used from other programming languages like Swift, Python, Kotlin, and Ruby.

## Features

- UniFFI-based bindings for the Network enum
- C-compatible FFI bindings for the Network enum
- Network information and utilities exposed through FFI
- Support for magic bytes operations
- Core version activation queries
Expand All @@ -21,16 +21,6 @@ This crate provides Foreign Function Interface (FFI) bindings for the `dash-netw
cargo build --release
```

### Generating Bindings

To generate bindings for your target language:

```bash
cargo run --bin uniffi-bindgen generate src/dash_network.udl --language swift
cargo run --bin uniffi-bindgen generate src/dash_network.udl --language python
cargo run --bin uniffi-bindgen generate src/dash_network.udl --language kotlin
```

### Example Usage (Swift)

```swift
Expand Down
3 changes: 2 additions & 1 deletion dash-network-ffi/build.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
fn main() {
uniffi::generate_scaffolding("src/dash_network.udl").unwrap();
// Build script for dash-network-ffi
// Standard FFI compilation without uniffi
}
41 changes: 0 additions & 41 deletions dash-network-ffi/src/dash_network.udl

This file was deleted.

Loading
Loading