Skip to content
Draft
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions .github/package-filters/rs-packages-direct.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ platform-encryption:
dash-platform-queries:
- packages/dash-platform-queries/**

dash-platform-cxx:
- packages/rs-platform-cxx/**

dash-sdk:
- packages/rs-sdk/**

Expand Down
10 changes: 10 additions & 0 deletions .github/package-filters/rs-packages-no-workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,16 @@ platform-encryption: &platform_encryption
dash-platform-queries: &platform_queries
- packages/dash-platform-queries/**

dash-platform-cxx:
- packages/rs-platform-cxx/**
- packages/rs-drive-proof-verifier/**
- *platform_queries
- *platform_query_wire
- *context_provider
- *dpp
- *drive
- *dapi_grpc

dash-sdk: &sdk
- packages/rs-drive-proof-verifier/**
- packages/rs-sdk/**
Expand Down
11 changes: 11 additions & 0 deletions .github/package-filters/rs-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,17 @@ dash-platform-queries: &platform_queries
- .github/workflows/tests*
- packages/dash-platform-queries/**

dash-platform-cxx:
- .github/workflows/tests*
- packages/rs-platform-cxx/**
- packages/rs-drive-proof-verifier/**
- *platform_queries
- *platform_query_wire
- *context_provider
- *dpp
- *drive
- *dapi_grpc

dash-sdk: &sdk
- .github/workflows/tests*
- packages/rs-drive-proof-verifier/**
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/tests-rs-workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -204,13 +204,14 @@ jobs:
cargo check -p drive-proof-verifier --locked
cargo check -p dash-platform-queries --locked
cargo check -p platform-query-wire --locked
cargo check -p dash-platform-cxx --locked
# Native graphs: assert the networking transport stack stays out.
# `tonic` itself is present (dapi-grpc's generated client types) but
# without its transport feature — which is exactly what the absence
# of hyper/rustls/tower proves. tokio is deliberately NOT asserted
# absent: dash-context-provider depends on dash-async, which uses it
# on native targets, and that edge predates the queries-crate split.
for native_package in platform-query-wire drive-proof-verifier dash-platform-queries; do
for native_package in platform-query-wire drive-proof-verifier dash-platform-queries dash-platform-cxx; do
for banned in hyper rustls tower; do
if cargo tree -p "$native_package" -e normal -i "$banned" 2>/dev/null | grep -q .; then
echo "::error::$banned leaked into $native_package's dependency tree"
Expand All @@ -227,6 +228,11 @@ jobs:
done
done

# The C++ embedding surface must link and run from the staged headers
# and archive alone; the Rust tests cannot see a broken header layout.
- name: Link the Platform CXX embedder from C++
run: packages/rs-platform-cxx/scripts/cxx-smoke.sh

- name: Detect immutable structure changes
if: github.event_name == 'pull_request'
run: |
Expand Down Expand Up @@ -346,6 +352,7 @@ jobs:
--package platform-serialization \
--package dapi-grpc \
--package platform-query-wire \
--package dash-platform-cxx \
--package json-schema-compatibility-validator \
--package dashpay-contract \
--package dpns-contract \
Expand Down
145 changes: 140 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ members = [
"packages/rs-dpp",
"packages/rs-drive",
"packages/rs-platform-query-wire",
"packages/rs-platform-cxx",
"packages/rs-platform-value",
"packages/rs-platform-serialization",
"packages/rs-platform-serialization-derive",
Expand Down
45 changes: 45 additions & 0 deletions packages/rs-platform-cxx/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
[package]
name = "dash-platform-cxx"
version.workspace = true
authors = ["Dash Core Group <dev@dash.org>"]
edition = "2021"
rust-version.workspace = true
license = "MIT"
description = "Transport-free CXX bindings for embedding Dash Platform"

[lib]
name = "dash_platform_cxx"
crate-type = ["staticlib", "rlib"]

[dependencies]
cxx = "1.0"
dapi-grpc = { path = "../dapi-grpc", default-features = false, features = [
"platform",
"client",
] }
dash-context-provider = { path = "../rs-context-provider", default-features = false }
dash-platform-queries = { path = "../dash-platform-queries", default-features = false }
drive-proof-verifier = { path = "../rs-drive-proof-verifier", default-features = false }
dpp = { path = "../rs-dpp", default-features = false, features = [
"state-transitions",
"state-transition-signing",
"state-transition-validation",
"identity-serialization",
"identity-hashing",
"bls-signatures",
"dpns-contract",
"dashpay-contract",
] }
platform-version = { path = "../rs-platform-version" }
prost = "0.14"
hex = "0.4"
futures = "0.3"
async-trait = "0.1"

[build-dependencies]
cxx-build = "1.0"

[dev-dependencies]
ciborium = "0.2.2"
serde_json = "1"
serde = { version = "1", features = ["derive"] }
Loading
Loading