Repository navigation
build: build the Dash Platform CXX bindings in depends behind PLATFORM_GUI=1 #7623
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
Open
PastaPastaPasta
wants to merge
4
commits into
dashpay:develop
Choose a base branch
from
PastaPastaPasta:feat/platform-cxx-depends
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+992
−12
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
0388e82
build(depends): add a prebuilt Rust toolchain and per-host standard l…
PastaPastaPasta 57deb92
build(depends): build dash-sdk-cxx behind a PLATFORM_GUI knob
PastaPastaPasta 9eaa74f
build: add --enable-platform-gui
PastaPastaPasta b3f0415
ci: build linux64_sqlite against depends with PLATFORM_GUI=1
PastaPastaPasta File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| #!/usr/bin/env bash | ||
| # | ||
| # Copyright (c) 2026 The Dash Core developers | ||
| # Distributed under the MIT software license, see the accompanying | ||
| # file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
|
||
| export LC_ALL=C.UTF-8 | ||
|
|
||
| # Depends with dash-sdk-cxx (PLATFORM_GUI=1); linux64_sqlite builds against it. | ||
| export CONTAINER_NAME=ci_native_platform_gui | ||
| export HOST=x86_64-pc-linux-gnu | ||
| export DEP_OPTS="PLATFORM_GUI=1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| #!/usr/bin/env python3 | ||
| # Copyright (c) 2026 The Dash Core developers | ||
| # Distributed under the MIT software license, see the accompanying | ||
| # file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
| ''' | ||
| Check that executables do not link Rust code. | ||
|
|
||
| dash-sdk-cxx, the Dash Platform SDK binding (--enable-platform-gui), is for | ||
| dash-qt only; dashd, the command-line tools and the fuzz binary must not | ||
| contain any of it. | ||
| A binary fails if its symbol table has cxx bridge, Rust runtime or Rust | ||
| standard library symbols, or has no symbols at all (a stripped binary cannot | ||
| be checked). | ||
|
|
||
| Example usage: | ||
|
|
||
| contrib/devtools/check-no-rust.py src/dashd src/dash-cli src/dash-tx src/dash-wallet src/test/fuzz/fuzz | ||
| ''' | ||
| import re | ||
| import subprocess | ||
| import sys | ||
|
|
||
| from utils import determine_wellknown_cmd | ||
|
|
||
| # cxx bridge symbols carry "cxxbridge1$". Rust code is either legacy-mangled | ||
| # under a crate namespace (rust, std, core, alloc) or v0-mangled ("_R" | ||
| # followed by a path tag and a crate root "Cs<disambiguator>_"), which C and | ||
| # C++ symbols never match. The allocator shim, the panic handler and the | ||
| # unwinding personality are plain C names every Rust program links. | ||
| RUST_SYMBOL = re.compile( | ||
| r'cxxbridge1\$' | ||
| r'|_ZN(4rust|3std|4core|5alloc)[0-9]' | ||
| r'|\b_?_R[A-Za-z0-9_]*?Cs[A-Za-z0-9]*_[0-9]' | ||
| r'|\b_?(__rust_alloc|rust_begin_unwind|rust_eh_personality)' | ||
| ) | ||
|
|
||
|
|
||
| def rust_symbols(nm, path): | ||
| result = subprocess.run(nm + [path], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, check=False) | ||
| if result.returncode != 0: | ||
| sys.exit(f'{path}: {result.stderr.strip()}') | ||
| lines = result.stdout.splitlines() | ||
| if not lines: | ||
| sys.exit(f'{path}: no symbols, so it cannot be checked (stripped?)') | ||
| return [line for line in lines if RUST_SYMBOL.search(line)] | ||
|
|
||
|
|
||
| def main(): | ||
| if len(sys.argv) < 2: | ||
| sys.exit(__doc__) | ||
| nm = determine_wellknown_cmd('NM', 'nm') | ||
| failed = False | ||
| for path in sys.argv[1:]: | ||
| found = rust_symbols(nm, path) | ||
| if found: | ||
| failed = True | ||
| print(f'{path}: links Rust code, for example:') | ||
| for line in found[:5]: | ||
| print(f' {line}') | ||
| sys.exit(1 if failed else 0) | ||
|
|
||
|
|
||
| if __name__ == '__main__': | ||
| main() |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.