From 1b41a248c44d11b5e0c544337ca64100d97590ac Mon Sep 17 00:00:00 2001 From: Super Genius Date: Sun, 24 Aug 2025 17:21:56 -0700 Subject: [PATCH 01/18] Adding thirdparty layout, info and integration steps --- ThirdParty_Libraries_Integration.md | 246 ++++++++++++++++++++++++++++ 1 file changed, 246 insertions(+) create mode 100644 ThirdParty_Libraries_Integration.md diff --git a/ThirdParty_Libraries_Integration.md b/ThirdParty_Libraries_Integration.md new file mode 100644 index 00000000..3ffc1391 --- /dev/null +++ b/ThirdParty_Libraries_Integration.md @@ -0,0 +1,246 @@ +# Third-Party Libraries Integration for SuperGenius Submodules + +The SuperGenius project, including submodules like the C++ RLP protocol, leverages a comprehensive set of third-party libraries to support functionalities such as cryptography, networking, data storage, logging, and testing. These libraries are hosted in the `https://www.github.com/GeniusVentures/thirdparty` repository and are integrated as submodules or external dependencies within the project's build system. This document provides a generic guide for integrating these libraries into any SuperGenius submodule, ensuring consistency with the existing setup as defined in the provided CMake configuration files and the C++ RLP protocol project. + +## Overview of Third-Party Libraries + +The following libraries are supported across SuperGenius submodules, as listed in `thirdparty_libraries.md`. Each library's purpose and approximate version (where available) are noted, with integration details tailored for generic submodule use. Exact versions should be confirmed via `.gitmodules`, commit hashes, or CMake configuration files. + +1. **abseil-cpp** (~20240116) + - **Purpose**: Provides modern C++ utilities for containers, strings, and time management. + - **Integration**: Include via `find_package(absl CONFIG REQUIRED)` in `CMakeLists.txt`. Set include directories to `${_THIRDPARTY_BUILD_DIR}/grpc/lib/cmake/absl`. Link against `absl::strings`, `absl::container`, etc., as needed. + +2. **AsyncIOManager** (Version: Unknown) + - **Purpose**: Supports asynchronous I/O for event loops and networking. + - **Integration**: Configure include paths in CMake to `${_THIRDPARTY_BUILD_DIR}/AsyncIOManager/include`. Link the library if prebuilt or build as a submodule in `${_THIRDPARTY_BUILD_DIR}`. + +3. **boost** (~1.89) + - **Purpose**: Offers utilities for error handling (`Boost.Outcome`), networking (`Boost.Asio`), endianness (`Boost.Endian`), and program options. + - **Integration**: Set `BOOST_VERSION` in `CommonBuildParameters.cmake` (e.g., 1.89.0). Use `find_package(Boost COMPONENTS program_options json filesystem REQUIRED)` and link against `Boost::program_options`, etc. Include directories from `${_THIRDPARTY_BUILD_DIR}/boost/build/include`. + +4. **boost-for-mobile** (~1.89) + - **Purpose**: Mobile-optimized Boost libraries for iOS/Android compatibility. + - **Integration**: Similar to Boost, but use platform-specific paths in `apple.toolchain.cmake` for iOS builds. Include `${_THIRDPARTY_BUILD_DIR}/boost-for-mobile/include` and link as needed. + +5. **c-ares** (~1.19.x) + - **Purpose**: Asynchronous DNS resolution for networking. + - **Integration**: Use `find_package(c-ares CONFIG REQUIRED)` and set include paths to `${_THIRDPARTY_BUILD_DIR}/c-ares/include`. Link against `c-ares::cares`. + +6. **celer-network** (Version: Unknown) + - **Purpose**: Blockchain scalability solutions. + - **Integration**: Configure as a submodule in `${_THIRDPARTY_BUILD_DIR}/celer-network`. Include headers and link libraries based on project-specific needs. + +7. **cpp-ipfs-http-client** (Version: Unknown) + - **Purpose**: HTTP client for IPFS decentralized storage. + - **Integration**: Set include paths to `${_THIRDPARTY_BUILD_DIR}/cpp-ipfs-http-client/include` and link the library. Ensure compatibility with `ipfs-lite-cpp`. + +8. **cryptopp-cmake** (~8.7.0) + - **Purpose**: Cryptographic algorithms for security. + - **Integration**: Use `find_package(CryptoPP CONFIG REQUIRED)` and link against `CryptoPP::CryptoPP`. Include directories from `${_THIRDPARTY_BUILD_DIR}/cryptopp-cmake/include`. + +9. **curl-android-ios** (~8.2.x) + - **Purpose**: HTTP requests for mobile platforms. + - **Integration**: Configure in `apple.toolchain.cmake` for iOS. Use `find_package(CURL REQUIRED)` and link against `CURL::libcurl`. Set include paths to `${_THIRDPARTY_BUILD_DIR}/curl-android-ios/include`. + +10. **delta-enabled-crdts** (Version: Unknown) + - **Purpose**: Conflict-free replicated data types for distributed systems. + - **Integration**: Include headers from `${_THIRDPARTY_BUILD_DIR}/delta-enabled-crdts/include` and link the library. Used in `crdt_globaldb` for distributed storage. + +11. **ed25519** (Version: Unknown) + - **Purpose**: Ed25519 cryptography for signing/verification. + - **Integration**: Set include paths to `${_THIRDPARTY_BUILD_DIR}/ed25519/include` and link the static library. Ensure compatibility with `TrustWalletCore`. + +12. **flutter** (~3.24.x) + - **Purpose**: Cross-platform UI framework for mobile apps. + - **Integration**: Typically used for UI submodules. Configure build scripts to integrate with `${_THIRDPARTY_BUILD_DIR}/flutter` and follow Flutter’s CMake integration guidelines. + +13. **fmt** (~10.2.0) + - **Purpose**: String formatting for logging and output. + - **Integration**: Use `find_package(fmt CONFIG REQUIRED)` and link against `fmt::fmt`. Include directories from `${_THIRDPARTY_BUILD_DIR}/fmt/include`. + +14. **gnostic** (Version: Unknown) + - **Purpose**: OpenAPI/Swagger processing for API generation. + - **Integration**: Configure as a submodule in `${_THIRDPARTY_BUILD_DIR}/gnostic`. Include headers and link as needed for API-related submodules. + +15. **gnus_upnp** (Version: Unknown) + - **Purpose**: UPnP for network discovery. + - **Integration**: Set include paths to `${_THIRDPARTY_BUILD_DIR}/gnus_upnp/include` and link the library. Ensure compatibility with networking components. + +16. **grpc** (Version: Unknown) + - **Purpose**: RPC framework for networked services. + - **Integration**: Configure via `find_package(gRPC CONFIG REQUIRED)` in `CommonBuildParameters.cmake`. Set include paths to `${_THIRDPARTY_BUILD_DIR}/grpc/include` and link against `gRPC::grpc++`. + +17. **GSL** (Version: Unknown) + - **Purpose**: C++ Core Guidelines support for code safety. + - **Integration**: Include headers from `${_THIRDPARTY_BUILD_DIR}/Microsoft.GSL/include`. No linking required as it’s header-only. + +18. **GTest** (~1.14.0) + - **Purpose**: Unit testing framework. + - **Integration**: Enable via `TESTING` option in `CommonCompilerOptions.cmake`. Use `find_package(GTest CONFIG REQUIRED)` and link against `GTest::gtest`. Set include paths to `${_THIRDPARTY_BUILD_DIR}/GTest/include`. Tests should follow `CLAUDE.md` guidelines. + +19. **hat-trie** (Version: Unknown) + - **Purpose**: Trie data structure for efficient lookups. + - **Integration**: Use `find_package(tsl_hat_trie CONFIG REQUIRED)` and link against `tsl_hat_trie::tsl_hat_trie`. Include directories from `${_THIRDPARTY_BUILD_DIR}/tsl_hat_trie/include`. + +20. **ipfs-bitswap-cpp** (Version: Unknown) + - **Purpose**: IPFS Bitswap protocol for data exchange. + - **Integration**: Include headers from `${_THIRDPARTY_BUILD_DIR}/ipfs-bitswap-cpp/include` and link the library. Ensure compatibility with `ipfs-lite-cpp`. + +21. **ipfs-lite-cpp** (Version: Unknown) + - **Purpose**: Lightweight IPFS client for decentralized storage. + - **Integration**: Used in `processing_dapp.cpp` for `sgns::ipfs_lite::ipfs::graphsync`. Include headers from `${_THIRDPARTY_BUILD_DIR}/ipfs-lite-cpp/include` and link the library. + +22. **ipfs-pubsub** (Version: Unknown) + - **Purpose**: IPFS publish/subscribe messaging. + - **Integration**: Used in `processing_dapp.cpp` and `processing_dapp_processor.cpp` for `sgns::ipfs_pubsub::GossipPubSub`. Configure include paths to `${_THIRDPARTY_BUILD_DIR}/ipfs-pubsub/include` and link the library. + +23. **json** (Version: Unknown) + - **Purpose**: JSON parsing for data interchange. + - **Integration**: Include headers from `${_THIRDPARTY_BUILD_DIR}/json/include`. Typically header-only, no linking required. + +24. **jsonrpc-lean** (Version: Unknown) + - **Purpose**: JSON-RPC for remote procedure calls. + - **Integration**: Configure include paths to `${_THIRDPARTY_BUILD_DIR}/jsonrpc-lean/include` and link the library if needed. + +25. **libp2p** (Version: Unknown) + - **Purpose**: Peer-to-peer networking. + - **Integration**: Used extensively in `processing_dapp.cpp` and `processing_dapp_processor.cpp`. Include headers from `${_THIRDPARTY_BUILD_DIR}/libp2p/include` and link against `libp2p`. + +26. **libsecp256k1** (Version: Unknown) + - **Purpose**: Secp256k1 cryptography for blockchain applications. + - **Integration**: Include headers from `${_THIRDPARTY_BUILD_DIR}/libsecp256k1/include` and link the static library. Compatible with `TrustWalletCore`. + +27. **libssh2** (Version: Unknown) + - **Purpose**: SSH protocol for secure communication. + - **Integration**: Use `find_package(Libssh2 REQUIRED)` and link against `Libssh2::libssh2`. Set include paths to `${_THIRDPARTY_BUILD_DIR}/libssh2/include`. + +28. **lmdb** (Version: Unknown) + - **Purpose**: Lightweight key-value store. + - **Integration**: Include headers from `${_THIRDPARTY_BUILD_DIR}/lmdb/include` and link the library. Suitable for lightweight storage needs. + +29. **MNN** (Version: Unknown) + - **Purpose**: Neural network inference for ML applications. + - **Integration**: Configure via `find_package(MNN CONFIG REQUIRED)` in `CommonBuildParameters.cmake`. Include directories from `${_THIRDPARTY_BUILD_DIR}/MNN/include` and link against `MNN::MNN`. + +30. **MoltenVK** (Version: Unknown) + - **Purpose**: Vulkan API for macOS/iOS. + - **Integration**: Configure in `apple.toolchain.cmake` for iOS builds. Include headers from `${_THIRDPARTY_BUILD_DIR}/MoltenVK/include` and link the library. + +31. **openssl** (~1.1.1t or 3.0.x) + - **Purpose**: Cryptographic functions for security. + - **Integration**: Set `OPENSSL_DIR` in `CommonBuildParameters.cmake` to `${_THIRDPARTY_BUILD_DIR}/openssl/build`. Use `find_package(OpenSSL REQUIRED)` and link against `OpenSSL::SSL` and `OpenSSL::Crypto`. + +32. **Parabeac-Core** (Version: Unknown) + - **Purpose**: UI code generation from designs. + - **Integration**: Configure as a submodule in `${_THIRDPARTY_BUILD_DIR}/Parabeac-Core`. Include headers and link as needed for UI submodules. + +33. **rapidjson** (~1.1.0) + - **Purpose**: Fast JSON parsing for data processing. + - **Integration**: Include headers from `${_THIRDPARTY_BUILD_DIR}/rapidjson/include`. Header-only, no linking required. + +34. **restclient-cpp** (Version: Unknown) + - **Purpose**: HTTP client for REST APIs. + - **Integration**: Include headers from `${_THIRDPARTY_BUILD_DIR}/restclient-cpp/include` and link the library. + +35. **rocksdb** (Version: Unknown) + - **Purpose**: High-performance key-value store. + - **Integration**: Configure via `find_package(RocksDB CONFIG REQUIRED)` in `CommonBuildParameters.cmake`. Include directories from `${_THIRDPARTY_BUILD_DIR}/rocksdb/include` and link against `RocksDB::rocksdb`. + +36. **soralog** (Version: Unknown) + - **Purpose**: Logging framework. + - **Integration**: Configure via `find_package(soralog CONFIG REQUIRED)` in `CommonBuildParameters.cmake`. Include directories from `${_THIRDPARTY_BUILD_DIR}/soralog/include` and link against `soralog`. Used in `processing_dapp.cpp` for logging. + +37. **spdlog** (Version: Unknown) + - **Purpose**: Fast logging library. + - **Integration**: Configure via `find_package(spdlog CONFIG REQUIRED)` in `CommonBuildParameters.cmake`. Include directories from `${_THIRDPARTY_BUILD_DIR}/spdlog/include` and link against `spdlog::spdlog`. Define `SPDLOG_FMT_EXTERNAL` for `fmt` integration. + +38. **sqlite3** (Version: Unknown) + - **Purpose**: SQLite database engine. + - **Integration**: Include headers from `${_THIRDPARTY_BUILD_DIR}/sqlite3/include` and link against `sqlite3`. + +39. **SQLiteModernCpp** (Version: Unknown) + - **Purpose**: C++ wrapper for SQLite. + - **Integration**: Include headers from `${_THIRDPARTY_BUILD_DIR}/SQLiteModernCpp/include`. Typically header-only. + +40. **sr25519-donna** (Version: Unknown) + - **Purpose**: Sr25519 cryptography for blockchain. + - **Integration**: Include headers from `${_THIRDPARTY_BUILD_DIR}/sr25519-donna/include` and link the static library. Compatible with `TrustWalletCore`. + +41. **stb** (Version: Unknown) + - **Purpose**: Single-file C/C++ utilities. + - **Integration**: Include headers from `${_THIRDPARTY_BUILD_DIR}/stb/include`. Header-only, no linking required. + +42. **Vulkan-Headers** (Version: Unknown) + - **Purpose**: Vulkan API headers for graphics. + - **Integration**: Include headers from `${_THIRDPARTY_BUILD_DIR}/Vulkan-Headers/include`. Header-only. + +43. **Vulkan-Loader** (Version: Unknown) + - **Purpose**: Vulkan runtime loader. + - **Integration**: Include headers from `${_THIRDPARTY_BUILD_DIR}/Vulkan-Loader/include` and link the library. + +44. **wallet-core** (Version: Unknown) + - **Purpose**: Cryptocurrency wallet utilities. + - **Integration**: Configure in `CommonBuildParameters.cmake` with libraries (`TrezorCrypto`, `wallet_core_rs`, `TrustWalletCore`) in `${_THIRDPARTY_BUILD_DIR}/wallet-core/lib`. Link against `TrustWalletCore` and include directories from `${_THIRDPARTY_BUILD_DIR}/wallet-core/include`. + +45. **xxhash** (Version: Unknown) + - **Purpose**: Fast hashing algorithm. + - **Integration**: Include headers from `${_THIRDPARTY_BUILD_DIR}/xxhash/include` and link the library. + +46. **yaml-cpp** (Version: Unknown) + - **Purpose**: YAML parsing for configuration. + - **Integration**: Configure via `find_package(yaml-cpp CONFIG REQUIRED)` in `CommonBuildParameters.cmake`. Include directories from `${_THIRDPARTY_BUILD_DIR}/yaml-cpp/include` and link against `yaml-cpp`. + +47. **zkLLVM** (Version: Unknown) + - **Purpose**: Zero-knowledge proof compilation. + - **Integration**: Managed in `CommonCompilerOptions.cmake` with `ZKLLVM_BUILD_DIR`. Download from GitHub if not found. Include headers from `${_THIRDPARTY_BUILD_DIR}/zkLLVM/include` and link the library. + +48. **zlib** (~1.2.13) + - **Purpose**: Data compression. + - **Integration**: Use `find_package(ZLIB REQUIRED)` and link against `ZLIB::ZLIB`. Include directories from `${_THIRDPARTY_BUILD_DIR}/zlib/include`. + +## Generic Integration Guidelines for Submodules + +### Submodule Management +- **Repository**: Libraries are hosted in `https://www.github.com/GeniusVentures/thirdparty` and managed as Git submodules in `${CMAKE_CURRENT_LIST_DIR}/../../thirdparty`. Update submodules via `git submodule update --init --recursive`. +- **Directory Structure**: Libraries are built in `${THIRDPARTY_BUILD_DIR}//`, with platform- and build-type-specific paths (e.g., `${THIRDPARTY_DIR}/build/${BUILD_PLATFORM_NAME}/${CMAKE_BUILD_TYPE}${ABI_SUBFOLDER_NAME}`), as defined in `CommonCompilerOptions.cmake`. +- **Version Control**: Confirm library versions via `.gitmodules` or commit hashes. For example, Boost is set to 1.89 in `CommonBuildParameters.cmake`. + +### CMake Configuration +- **Find Packages**: Use `find_package` for CMake-compatible libraries (e.g., `Boost`, `GTest`, `Protobuf`). Specify `CONFIG` mode for precise control, as shown in `CommonBuildParameters.cmake`. +- **Include Directories**: Set include paths to `${_THIRDPARTY_BUILD_DIR}//include` using `include_directories` or `target_include_directories`. For example, `include_directories(${_THIRDPARTY_BUILD_DIR}/stb/include)` for `stb`. +- **Library Linking**: Link libraries using `target_link_libraries`. For example, link `processing_dapp` to `Boost::program_options` and `crdt_globaldb` in `CMakeLists.txt`. +- **Platform-Specific Handling**: For iOS builds, use `apple.toolchain.cmake` to configure architectures (`arm64`, `x86_64`) and frameworks. Set `CMAKE_FIND_ROOT_PATH` to include `${CMAKE_OSX_SYSROOT_INT}` for cross-compilation. +- **Build Options**: Enable options like `TESTING` or `BUILD_EXAMPLES` in `CommonCompilerOptions.cmake` for testing and example builds. Ensure dependencies are conditionally included based on these options. + +### Coding Standards +- **Conformance**: Follow `CLAUDE.md` guidelines (Microsoft-based style, PascalCase for classes/methods, camelCase for variables, 4-space indent, 120-character line limit). Use `outcome::result` for error handling, as seen in `processing_dapp_processor.cpp`. +- **Thread Safety**: Libraries like `libp2p` and `AsyncIOManager` support asynchronous operations. Ensure thread safety by using mutexes or atomic operations where needed, as per issue #16 in `rlp_project_instructions.md`. +- **Error Handling**: Use `Boost.Outcome` for error propagation, as specified in `rlp_project_instructions.md`. Libraries like `abseil-cpp` and `GSL` enhance type safety and error checking. + +### Testing Integration +- **GTest**: For unit testing, follow `CLAUDE.md` to place tests in `test/` with descriptive names. Use `find_package(GTest)` and link against `GTest::gtest`. Run tests with `ninja test` or specific filters (e.g., `./test_bin/buffer_test --gtest_filter=BufferTest.EmptyBuffer`). +- **Coverage**: Target >95% coverage, as per issue #4 in `rlp_project_instructions.md`. Use tools like `gcov` or `lcov` in CI pipelines. +- **Sanitizers**: Enable AddressSanitizer/Valgrind via `SANITIZE_CODE` in `CommonCompilerOptions.cmake` for memory safety, as per issue #6. + +### Platform Considerations +- **iOS/macOS**: Use `apple.toolchain.cmake` for iOS builds, supporting `OS64`, `SIMULATOR64`, etc. Ensure libraries like `curl-android-ios`, `MoltenVK`, and `TrustWalletCore` are configured for mobile platforms. +- **Cross-Platform**: Test on Linux, macOS, and Windows via CI pipelines (issue #12). Use `CMAKE_SYSTEM_NAME` and `CMAKE_HOST_SYSTEM_NAME` to handle platform-specific configurations. +- **Embedded Systems**: For resource-constrained platforms (issue #18), optimize libraries like `lmdb` and `xxhash` for minimal memory usage. + +### CI/CD and Tooling +- **GitHub Actions**: Set up multi-platform builds, compiler testing, and coverage reporting, as per issue #12. Include security scanning with CodeQL. +- **Static Analysis**: Use `clang-format` and `clang-tidy` for code style enforcement, as per issue #17. Configure pre-commit hooks to ensure compliance. +- **WebAssembly**: For WebAssembly builds (issue #18), configure libraries like `boost` and `cryptopp-cmake` with Emscripten toolchains. + +### Example Integration for RLP Submodule +- **Dependencies**: The RLP protocol uses `Boost.Outcome` for error handling, `GTest` for testing, and potentially `cryptopp-cmake` or `openssl` for cryptographic operations. Configure these in `CMakeLists.txt` as per issue #3. +- **Implementation**: Use `abseil-cpp` for safe container handling in `rlp_decoder.cpp`. Include `rapidjson` or `json` for JSON-to-RLP utilities (issue #15). Leverage `spdlog` and `soralog` for logging, similar to `processing_dapp.cpp`. +- **Testing**: Implement Ethereum RLP test vectors (issue #5) using `GTest`. Add fuzz testing with `abseil-cpp` utilities for robust error checking. + +## Best Practices for Submodule Developers +- **Minimal Changes**: Per `CLAUDE.md`, suggest changes without modifying files directly. Use concise diffs for small changes (2-3 lines), as per `rlp_project_instructions.md`. +- **Dependency Verification**: Check library availability in `${_THIRDPARTY_BUILD_DIR}` before use. If missing, suggest downloading via GitHub releases, as done for `zkLLVM` in `CommonCompilerOptions.cmake`. +- **Performance**: Optimize hot paths using `xxhash` or `abseil-cpp` for fast data processing, as per issue #14. Consider `MNN` for ML-related submodules. +- **Documentation**: Follow issue #10 for Doxygen documentation and usage examples. Include performance characteristics for libraries like `rocksdb` or `libp2p`. + +This generic integration guide ensures that SuperGenius submodules, including the C++ RLP protocol, can seamlessly incorporate third-party libraries while adhering to the project’s build system, coding standards, and testing practices. \ No newline at end of file From 1bf263d2292a6b0b7aaea41942a0de94f8a873cb Mon Sep 17 00:00:00 2001 From: Super Genius Date: Sun, 24 Aug 2025 17:34:19 -0700 Subject: [PATCH 02/18] Updating to our last version of boost being used, which is 1.85.0 --- ThirdParty_Libraries_Integration.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ThirdParty_Libraries_Integration.md b/ThirdParty_Libraries_Integration.md index 3ffc1391..21f25d5c 100644 --- a/ThirdParty_Libraries_Integration.md +++ b/ThirdParty_Libraries_Integration.md @@ -14,11 +14,11 @@ The following libraries are supported across SuperGenius submodules, as listed i - **Purpose**: Supports asynchronous I/O for event loops and networking. - **Integration**: Configure include paths in CMake to `${_THIRDPARTY_BUILD_DIR}/AsyncIOManager/include`. Link the library if prebuilt or build as a submodule in `${_THIRDPARTY_BUILD_DIR}`. -3. **boost** (~1.89) +3. **boost** (~1.85) - **Purpose**: Offers utilities for error handling (`Boost.Outcome`), networking (`Boost.Asio`), endianness (`Boost.Endian`), and program options. - - **Integration**: Set `BOOST_VERSION` in `CommonBuildParameters.cmake` (e.g., 1.89.0). Use `find_package(Boost COMPONENTS program_options json filesystem REQUIRED)` and link against `Boost::program_options`, etc. Include directories from `${_THIRDPARTY_BUILD_DIR}/boost/build/include`. + - **Integration**: Set `BOOST_VERSION` in `CommonBuildParameters.cmake` (e.g., 1.85.0). Use `find_package(Boost COMPONENTS program_options json filesystem REQUIRED)` and link against `Boost::program_options`, etc. Include directories from `${_THIRDPARTY_BUILD_DIR}/boost/build/include`. -4. **boost-for-mobile** (~1.89) +4. **boost-for-mobile** (~1.85) - **Purpose**: Mobile-optimized Boost libraries for iOS/Android compatibility. - **Integration**: Similar to Boost, but use platform-specific paths in `apple.toolchain.cmake` for iOS builds. Include `${_THIRDPARTY_BUILD_DIR}/boost-for-mobile/include` and link as needed. @@ -243,4 +243,4 @@ The following libraries are supported across SuperGenius submodules, as listed i - **Performance**: Optimize hot paths using `xxhash` or `abseil-cpp` for fast data processing, as per issue #14. Consider `MNN` for ML-related submodules. - **Documentation**: Follow issue #10 for Doxygen documentation and usage examples. Include performance characteristics for libraries like `rocksdb` or `libp2p`. -This generic integration guide ensures that SuperGenius submodules, including the C++ RLP protocol, can seamlessly incorporate third-party libraries while adhering to the project’s build system, coding standards, and testing practices. \ No newline at end of file +This generic integration guide ensures that SuperGenius submodules, including the C++ RLP protocol, can seamlessly incorporate third-party libraries while adhering to the project’s build system, coding standards, and testing practices. From b7d64ef80211337a85cdfcf6f65baccd10e5b6ff Mon Sep 17 00:00:00 2001 From: Super Genius Date: Thu, 12 Mar 2026 10:10:59 -0700 Subject: [PATCH 03/18] Adding Boost::context that's needed for multi-threaded CoRoutine type of functionality of RLP --- build/CommonCompilerOptions.CMake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/CommonCompilerOptions.CMake b/build/CommonCompilerOptions.CMake index 0f1237d6..bfe0459b 100644 --- a/build/CommonCompilerOptions.CMake +++ b/build/CommonCompilerOptions.CMake @@ -91,7 +91,7 @@ if(NOT EXISTS "${THIRDPARTY_DIR}/build") endif() # Boost settings -set(BOOST_INCLUDE_LIBRARIES container date_time filesystem json log program_options random regex system test timer) +set(BOOST_INCLUDE_LIBRARIES container date_time filesystem json log program_options random regex system test timer context) list(JOIN BOOST_INCLUDE_LIBRARIES "," BOOST_INCLUDE_LIBRARIES_COMMA_SEPARATED) separate_arguments(BOOST_B2_FLAGS NATIVE_COMMAND "${CMAKE_CXX_FLAGS}") From b678515262144ff62e529cf03e77d6baefe99f98 Mon Sep 17 00:00:00 2001 From: Super Genius Date: Thu, 12 Mar 2026 11:33:43 -0700 Subject: [PATCH 04/18] Fixes to add boost::context to all platforms and generated the find_package cmake config for it --- build/Android/CMakeLists.txt | 2 ++ build/OSX/CMakeLists.txt | 3 +++ build/Windows/CMakeLists.txt | 1 + build/iOS/CMakeLists.txt | 2 ++ 4 files changed, 8 insertions(+) diff --git a/build/Android/CMakeLists.txt b/build/Android/CMakeLists.txt index 91a0d42a..330bebbc 100644 --- a/build/Android/CMakeLists.txt +++ b/build/Android/CMakeLists.txt @@ -92,6 +92,7 @@ set(boost_log_DIR "${BOOST_ROOT}/lib/cmake/boost_log-${BOOST_VERSION}") set(boost_log_setup_DIR "${BOOST_ROOT}/lib/cmake/boost_log_setup-${BOOST_VERSION}") set(boost_container_DIR "${BOOST_ROOT}/lib/cmake/boost_container-${BOOST_VERSION}") set(boost_unit_test_framework_DIR "${BOOST_ROOT}/lib/cmake/boost_unit_test_framework-${BOOST_VERSION}") +set(boost_context_DIR "${BOOST_ROOT}/lib/cmake/boost_context-${BOOST_VERSION}") set(_BOOST_CACHE_ARGS -DBOOST_ROOT:PATH=${BOOST_ROOT} @@ -115,6 +116,7 @@ set(_BOOST_CACHE_ARGS -Dboost_system_DIR:PATH=${boost_system_DIR} -Dboost_thread_DIR:PATH=${boost_thread_DIR} -Dboost_unit_test_framework_DIR:PATH=${boost_unit_test_framework_DIR} + -Dboost_context_DIR:PATH=${boost_context_DIR} -DBoost_COMPILER:STRING=clang ) diff --git a/build/OSX/CMakeLists.txt b/build/OSX/CMakeLists.txt index 58e1b65a..abf8f2f4 100644 --- a/build/OSX/CMakeLists.txt +++ b/build/OSX/CMakeLists.txt @@ -61,6 +61,7 @@ ExternalProject_Add(Boost "${BOOST_ROOT}/lib/libboost_chrono.a" "${BOOST_ROOT}/lib/libboost_log.a" "${BOOST_ROOT}/lib/libboost_log_setup.a" + "${BOOST_ROOT}/lib/libboost_context.a" ) @@ -73,6 +74,7 @@ set(boost_program_options_DIR "${BOOST_ROOT}/lib/cmake/boost_program_options-${B set(boost_random_DIR "${BOOST_ROOT}/lib/cmake/boost_random-${BOOST_VERSION}") set(boost_regex_DIR "${BOOST_ROOT}/lib/cmake/boost_regex-${BOOST_VERSION}") set(boost_system_DIR "${BOOST_ROOT}/lib/cmake/boost_system-${BOOST_VERSION}") +set(boost_context_DIR "${BOOST_ROOT}/lib/cmake/boost_context-${BOOST_VERSION}") set(_BOOST_CACHE_ARGS -DBOOST_ROOT:PATH=${BOOST_ROOT} @@ -85,6 +87,7 @@ set(_BOOST_CACHE_ARGS -Dboost_random_DIR:PATH=${boost_random_DIR} -Dboost_regex_DIR:PATH=${boost_regex_DIR} -Dboost_system_DIR:PATH=${boost_system_DIR} + -Dboost_context_DIR:PATH=${boost_context_DIR} -DBoost_NO_SYSTEM_PATHS:BOOL=ON -DBoost_USE_MULTITHREADED:BOOL=ON -DBoost_USE_STATIC_LIBS:BOOL=ON diff --git a/build/Windows/CMakeLists.txt b/build/Windows/CMakeLists.txt index 0e282616..37eea8ee 100644 --- a/build/Windows/CMakeLists.txt +++ b/build/Windows/CMakeLists.txt @@ -57,6 +57,7 @@ set(_BOOST_CACHE_ARGS -Dboost_random_DIR:PATH=${Boost_DIR}/boost_random-${BOOST_VERSION} -Dboost_regex_DIR:PATH=${Boost_DIR}/boost_regex-${BOOST_VERSION} -Dboost_system_DIR:PATH=${Boost_DIR}/boost_system-${BOOST_VERSION} + -Dboost_context_DIR:PATH=${Boost_DIR}/boost_context-${BOOST_VERSION} -DBoost_NO_SYSTEM_PATHS:BOOL=ON -DBoost_USE_MULTITHREADED:BOOL=ON -DBoost_USE_STATIC_LIBS:BOOL=ON diff --git a/build/iOS/CMakeLists.txt b/build/iOS/CMakeLists.txt index ffa8264b..aafb7d70 100644 --- a/build/iOS/CMakeLists.txt +++ b/build/iOS/CMakeLists.txt @@ -57,6 +57,7 @@ set(boost_filesystem_DIR "${BOOST_ROOT}/lib/cmake/boost_filesystem-${BOOST_VERSI set(boost_program_options_DIR "${BOOST_ROOT}/lib/cmake/boost_program_options-${BOOST_VERSION}") set(boost_regex_DIR "${BOOST_ROOT}/lib/cmake/boost_regex-${BOOST_VERSION}") set(boost_date_time_DIR "${BOOST_ROOT}/lib/cmake/boost_date_time-${BOOST_VERSION}") +set(boost_context_DIR "${BOOST_ROOT}/lib/cmake/boost_context-${BOOST_VERSION}") set(_BOOST_CACHE_ARGS -DBOOST_ROOT:PATH=${BOOST_ROOT} @@ -73,6 +74,7 @@ set(_BOOST_CACHE_ARGS -Dboost_random_DIR:PATH=${boost_random_DIR} -Dboost_regex_DIR:PATH=${boost_regex_DIR} -Dboost_system_DIR:PATH=${boost_system_DIR} + -Dboost_context_DIR:PATH=${boost_context_DIR} ) # OpenSSL From b8dc20c727489f32f451f22a1a14863142234228 Mon Sep 17 00:00:00 2001 From: Eduardo Menges Mattje Date: Thu, 12 Mar 2026 11:12:53 -0300 Subject: [PATCH 05/18] Removed unused submodules --- .gitmodules | 15 --------------- celer-network/pb3-gen-sol | 1 - cpp-ipfs-http-client | 1 - cryptopp-cmake | 1 - gnostic | 1 - lmdb | 1 - 6 files changed, 20 deletions(-) delete mode 160000 celer-network/pb3-gen-sol delete mode 160000 cpp-ipfs-http-client delete mode 160000 cryptopp-cmake delete mode 160000 gnostic delete mode 160000 lmdb diff --git a/.gitmodules b/.gitmodules index 78d20ced..0e7de204 100644 --- a/.gitmodules +++ b/.gitmodules @@ -9,12 +9,6 @@ [submodule "ipfs-lite-cpp"] path = ipfs-lite-cpp url = ../ipfs-lite-cpp.git -[submodule "celer-network/pb3-gen-sol"] - path = celer-network/pb3-gen-sol - url = https://github.com/celer-network/pb3-gen-sol.git -[submodule "lmdb"] - path = lmdb - url = ../lmdb.git [submodule "flutter"] path = flutter url = https://github.com/flutter/flutter.git @@ -37,9 +31,6 @@ path = Boost.DI url = ../Boost.DI branch = cpp14 -[submodule "cpp-ipfs-http-client"] - path = cpp-ipfs-http-client - url = https://github.com/vasild/cpp-ipfs-http-client [submodule "ipfs-pubsub"] path = ipfs-pubsub url = ../ipfs-pubsub.git @@ -52,9 +43,6 @@ [submodule "rapidjson"] path = rapidjson url = ../rapidjson.git -[submodule "gnostic"] - path = gnostic - url = https://github.com/googleapis/gnostic [submodule "rocksdb"] path = rocksdb url = ../rocksdb.git @@ -117,9 +105,6 @@ [submodule "AsyncIOManager"] path = AsyncIOManager url = ../AsyncIOManager.git -[submodule "cryptopp-cmake"] - path = cryptopp-cmake - url = https://github.com/abdes/cryptopp-cmake.git [submodule "stb"] path = stb url = https://github.com/nothings/stb.git diff --git a/celer-network/pb3-gen-sol b/celer-network/pb3-gen-sol deleted file mode 160000 index a533630b..00000000 --- a/celer-network/pb3-gen-sol +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a533630b5c883b75d4228c684694262c764c72d5 diff --git a/cpp-ipfs-http-client b/cpp-ipfs-http-client deleted file mode 160000 index 763e59ad..00000000 --- a/cpp-ipfs-http-client +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 763e59ad698f3e3846f85df11e01c18ef3fbc401 diff --git a/cryptopp-cmake b/cryptopp-cmake deleted file mode 160000 index 9327192b..00000000 --- a/cryptopp-cmake +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9327192b0095dc1f420b2082d37bd427b5750d48 diff --git a/gnostic b/gnostic deleted file mode 160000 index b262eedc..00000000 --- a/gnostic +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b262eedca18529879e9eb12c97fa2a188c5e1ebe diff --git a/lmdb b/lmdb deleted file mode 160000 index 10e4b713..00000000 --- a/lmdb +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 10e4b71350fe3e8516115dee4f50b43f13ee42df From fd3baf1813fcd5783a39be28945720c13d640bbd Mon Sep 17 00:00:00 2001 From: Eduardo Menges Mattje Date: Thu, 12 Mar 2026 11:19:10 -0300 Subject: [PATCH 06/18] Added parallel checkout to submodules --- .github/workflows/build-targets.yml | 5 +++-- .github/workflows/build.yml | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-targets.yml b/.github/workflows/build-targets.yml index 5d93ddb4..efba25a8 100644 --- a/.github/workflows/build-targets.yml +++ b/.github/workflows/build-targets.yml @@ -252,8 +252,9 @@ jobs: - name: Checkout uses: actions/checkout@v4 - with: - submodules: "recursive" + + - name: Parallel checkout submodules + run: git submodule update --init --recursive --jobs 4 - name: Configure Linux host if: ${{ runner.os == 'Linux'}} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8ab8ff62..ba82331c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -101,8 +101,9 @@ jobs: - name: Checkout uses: actions/checkout@v4 - with: - submodules: "recursive" + + - name: Parallel checkout submodules + run: git submodule update --init --recursive --jobs 4 - name: Configure Linux host if: ${{ runner.os == 'Linux'}} From 4dcbe7738502f973bce908968f438621ff415dd5 Mon Sep 17 00:00:00 2001 From: Eduardo Menges Mattje Date: Thu, 12 Mar 2026 11:28:53 -0300 Subject: [PATCH 07/18] Fixed Nlohmann JSON URL --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 0e7de204..56fddf76 100644 --- a/.gitmodules +++ b/.gitmodules @@ -119,7 +119,7 @@ url = ../sqlite_modern_cpp.git [submodule "json"] path = json - url = git@github.com:nlohmann/json.git + url = https://github.com/nlohmann/json.git [submodule "snappy"] path = snappy url = https://github.com/google/snappy.git From 09b7558be39310ae4e2219e3b4947bf1fff4554b Mon Sep 17 00:00:00 2001 From: Eduardo Menges Mattje Date: Thu, 12 Mar 2026 11:35:02 -0300 Subject: [PATCH 08/18] Updated Nolhmann JSON --- .gitmodules | 2 +- build/CommonTargets.CMake | 84 ++++++++++++++++----------------------- json | 2 +- 3 files changed, 37 insertions(+), 51 deletions(-) diff --git a/.gitmodules b/.gitmodules index 56fddf76..d9be61b8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -118,7 +118,7 @@ path = SQLiteModernCpp url = ../sqlite_modern_cpp.git [submodule "json"] - path = json + path = json url = https://github.com/nlohmann/json.git [submodule "snappy"] path = snappy diff --git a/build/CommonTargets.CMake b/build/CommonTargets.CMake index cfb12cdc..fcb17385 100644 --- a/build/CommonTargets.CMake +++ b/build/CommonTargets.CMake @@ -132,20 +132,20 @@ set(Protobuf_INCLUDE_DIR "${INSTALL_DIR}/include") # Snappy for RocksDB compression ExternalProject_Add(snappy - PREFIX snappy - SOURCE_DIR "${THIRDPARTY_DIR}/snappy" - CMAKE_ARGS - CMAKE_CACHE_ARGS - -DCMAKE_INSTALL_PREFIX:PATH= - -DFAIL_ON_WARNINGS:BOOL=OFF - -DSNAPPY_BUILD_TESTS:BOOL=OFF - -DSNAPPY_BUILD_BENCHMARKS:BOOL=OFF - ${_CMAKE_COMMON_CACHE_ARGS} - # these need to be at the end to override previous cached args line - -DCMAKE_CXX_FLAGS_DEBUG:STRING=${CMAKE_CXX_FLAGS_DEBUG}\ -DNDEBUG - -DCMAKE_C_FLAGS_DEBUG:STRING=${CMAKE_C_FLAGS_DEBUG}\ -DNDEBUG - BUILD_BYPRODUCTS - "${CMAKE_CURRENT_BINARY_DIR}/snappy/lib/libsnappy.a" + PREFIX snappy + SOURCE_DIR "${THIRDPARTY_DIR}/snappy" + CMAKE_ARGS + CMAKE_CACHE_ARGS + -DCMAKE_INSTALL_PREFIX:PATH= + -DFAIL_ON_WARNINGS:BOOL=OFF + -DSNAPPY_BUILD_TESTS:BOOL=OFF + -DSNAPPY_BUILD_BENCHMARKS:BOOL=OFF + ${_CMAKE_COMMON_CACHE_ARGS} + # these need to be at the end to override previous cached args line + -DCMAKE_CXX_FLAGS_DEBUG:STRING=${CMAKE_CXX_FLAGS_DEBUG}\ -DNDEBUG + -DCMAKE_C_FLAGS_DEBUG:STRING=${CMAKE_C_FLAGS_DEBUG}\ -DNDEBUG + BUILD_BYPRODUCTS + "${CMAKE_CURRENT_BINARY_DIR}/snappy/lib/libsnappy.a" ) set(_FINDPACKAGE_SNAPPY_DIR "${CMAKE_CURRENT_BINARY_DIR}/snappy/lib/cmake/Snappy") @@ -374,11 +374,6 @@ set(_FINDPACKAGE_libp2p_CONFIG_DIR "${CMAKE_CURRENT_BINARY_DIR}/libp2p/lib/cmake set(_FINDPACKAGE_libp2p_LIBRARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/libp2p/lib") set(_FINDPACKAGE_LIBP2P_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/libp2p/include") -#if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") -# set(IS_APPLE_PLATFORM ON) -#elseif(CMAKE_SYSTEM_NAME STREQUAL "iOS") -# set(IS_APPLE_PLATFORM ON) -#endif() if(NOT ANDROID) # Vulkan-Headers ExternalProject_Add( @@ -412,25 +407,25 @@ if(NOT ANDROID) endif() if(NOT APPLE OR (APPLE AND CMAKE_OSX_SYSROOT MATCHES "iPhoneOS")) -ExternalProject_Add(MNN - PREFIX MNN - SOURCE_DIR "${THIRDPARTY_DIR}/MNN" - CMAKE_CACHE_ARGS - -DCMAKE_INSTALL_PREFIX:PATH= - -DMNN_BUILD_SHARED_LIBS:BOOL=OFF - -DMNN_BUILD_TESTS:BOOL=OFF - -DMNN_BUILD_TOOLS:BOOL=OFF - -DMNN_BUILD_PROTOBUFFER:BOOL=OFF - -DMNN_VULKAN:BOOL=ON - -DMNN_WIN_RUNTIME_MT:BOOL=ON - ${_CMAKE_COMMON_CACHE_ARGS} - ${_MNN_EXTRA_PARAM} - DEPENDS ${_MNN_DEPENDS} ${vulkanTarget} -) + ExternalProject_Add(MNN + PREFIX MNN + SOURCE_DIR "${THIRDPARTY_DIR}/MNN" + CMAKE_CACHE_ARGS + -DCMAKE_INSTALL_PREFIX:PATH= + -DMNN_BUILD_SHARED_LIBS:BOOL=OFF + -DMNN_BUILD_TESTS:BOOL=OFF + -DMNN_BUILD_TOOLS:BOOL=OFF + -DMNN_BUILD_PROTOBUFFER:BOOL=OFF + -DMNN_VULKAN:BOOL=ON + -DMNN_WIN_RUNTIME_MT:BOOL=ON + ${_CMAKE_COMMON_CACHE_ARGS} + ${_MNN_EXTRA_PARAM} + DEPENDS ${_MNN_DEPENDS} ${vulkanTarget} + ) -set(_FINDPACKAGE_MNN_CONFIG_DIR "${CMAKE_CURRENT_BINARY_DIR}/MNN/lib/cmake/MNN") -set(_FINDPACKAGE_MNN_LIBRARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/MNN/lib") -set(_FINDPACKAGE_MNN_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/MNN/include") + set(_FINDPACKAGE_MNN_CONFIG_DIR "${CMAKE_CURRENT_BINARY_DIR}/MNN/lib/cmake/MNN") + set(_FINDPACKAGE_MNN_LIBRARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/MNN/lib") + set(_FINDPACKAGE_MNN_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/MNN/include") endif() # ipfs-lite-cpp @@ -657,7 +652,7 @@ ExternalProject_Add(wallet-core # doesn't short-circuit a second config (e.g. Release after Debug) and skip # building the correct config's artifact. PATCH_COMMAND ${CMAKE_COMMAND} -E rm -f "${THIRDPARTY_DIR}/wallet-core/rust/target/libwallet_core_rs.a" - COMMAND ${_WALLET_CORE_GENERATE_SCRIPT} --target-os=${_WALLET_CORE_ARCH} --arch-abi=${WALLET_CORE_ARCH_ABI} --protobuf-dir=${PROTOBUF_HOST_PREFIX} --out-dir= --plugin-dir=${ProtobufPlugin_DIR}/bin --build-type=$ + COMMAND ${_WALLET_CORE_GENERATE_SCRIPT} --target-os=${_WALLET_CORE_ARCH} --arch-abi=${WALLET_CORE_ARCH_ABI} --protobuf-dir=${PROTOBUF_HOST_PREFIX} --out-dir= --plugin-dir=${ProtobufPlugin_DIR}/bin --build-type=$ DEPENDS Boost grpc openssl protobuf-plugin BUILD_BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/wallet-core/lib/libTrustWalletCore.a" @@ -720,9 +715,6 @@ ExternalProject_Add(AsyncIOManager ${_CMAKE_COMMON_CACHE_ARGS} DEPENDS libssh2 openssl ipfs-lite-cpp ipfs-bitswap-cpp grpc ${PROTOBUF_TARGET} Boost MNN ) -set(_FINDPACKAGE_ASIOMGR_CONFIG_DIR "${CMAKE_CURRENT_BINARY_DIR}/AsyncIOManager/lib/cmake/AsyncIOManager") -set(_FINDPACKAGE_ASIOMGR_LIBRARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/AsyncIOManager/lib") -set(_FINDPACKAGE_ASIOMGR_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/AsyncIOManager/include") # gnus_upnp ExternalProject_Add(gnus_upnp @@ -741,25 +733,19 @@ ExternalProject_Add(gnus_upnp ${_OPENSSL_CACHE_ARGS} DEPENDS Boost fmt spdlog tsl_hat_trie yaml-cpp ) -set(_FINDPACKAGE_GNUS_UPNP_CONFIG_DIR "${CMAKE_CURRENT_BINARY_DIR}/gnus_upnp/lib/cmake/gnus_upnp") -set(_FINDPACKAGE_GNUS_UPNP_LIBRARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/gnus_upnp/lib") -set(_FINDPACKAGE_GNUS_UPNP_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/gnus_upnp/include") -#json.hpp +# Nlohmann JSON ExternalProject_Add(json PREFIX json SOURCE_DIR "${THIRDPARTY_DIR}/json" CMAKE_CACHE_ARGS -DCMAKE_INSTALL_PREFIX:PATH= - -DJSON_BuildTests:BOOL=OFF + -DJSON_BuildTests:BOOL=OFF ${_CMAKE_COMMON_CACHE_ARGS} ${_BOOST_CACHE_ARGS} ${_OPENSSL_CACHE_ARGS} DEPENDS Boost ) -set(_FINDPACKAGE_JSON_CONFIG_DIR "${CMAKE_CURRENT_BINARY_DIR}/json/lib/cmake/valijson") -set(_FINDPACKAGE_JSON_LIBRARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/json/lib") -set(_FINDPACKAGE_JSON_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/json/include") # jsonrpc-lean install( diff --git a/json b/json index 55abcb5c..55f93686 160000 --- a/json +++ b/json @@ -1 +1 @@ -Subproject commit 55abcb5c0f0571b07a1717665859dbc5a9522f1b +Subproject commit 55f93686c01528224f448c19128836e7df245f72 From df54d27ddbef7af430d1521b050cb7610d7de25e Mon Sep 17 00:00:00 2001 From: Eduardo Menges Mattje Date: Thu, 12 Mar 2026 13:20:36 -0300 Subject: [PATCH 09/18] Removed gRPC --- .gitmodules | 6 ++-- build/CommonTargets.CMake | 70 +++++++++------------------------------ grpc | 1 - protobuf | 1 + wallet-core | 2 +- 5 files changed, 20 insertions(+), 60 deletions(-) delete mode 160000 grpc create mode 160000 protobuf diff --git a/.gitmodules b/.gitmodules index d9be61b8..9dcd3d1a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -15,9 +15,6 @@ [submodule "curl-android-ios"] path = curl-android-ios url = https://github.com/gcesarmza/curl-android-ios.git -[submodule "grpc"] - path = grpc - url = ../grpc [submodule "GSL"] path = GSL url = ../GSL.git @@ -123,3 +120,6 @@ [submodule "snappy"] path = snappy url = https://github.com/google/snappy.git +[submodule "protobuf"] + path = protobuf + url = https://github.com/protocolbuffers/protobuf.git diff --git a/build/CommonTargets.CMake b/build/CommonTargets.CMake index fcb17385..e76cdc2e 100644 --- a/build/CommonTargets.CMake +++ b/build/CommonTargets.CMake @@ -15,7 +15,7 @@ if(CMAKE_CROSSCOMPILING) ExternalProject_Add(protobuf_host PREFIX ${PROTOBUF_HOST_PREFIX} - SOURCE_DIR "${THIRDPARTY_DIR}/grpc/third_party/protobuf" + SOURCE_DIR "${THIRDPARTY_DIR}/protobuf" CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH= CMAKE_CACHE_ARGS @@ -29,17 +29,12 @@ if(CMAKE_CROSSCOMPILING) ${_PROTOBUF_HOST_EXTRA_CACHE_ARGS} ) else() - set(PROTOBUF_HOST_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/grpc") - set(PROTOBUF_TARGET grpc) -endif() - -if(MSVC) - set(Protobuf_HOST_DIR "${PROTOBUF_HOST_PREFIX}/cmake") -else() - set(Protobuf_HOST_DIR "${PROTOBUF_HOST_PREFIX}/lib/cmake/protobuf") + set(PROTOBUF_HOST_PREFIX "${CMAKE_CURRENT_BINARY_DIR}/protobuf") + set(PROTOBUF_TARGET protobuf) endif() set(absl_HOST_DIR "${PROTOBUF_HOST_PREFIX}/lib/cmake/absl") +set(Protobuf_HOST_DIR "${PROTOBUF_HOST_PREFIX}/lib/cmake/protobuf") set(utf8_range_HOST_DIR "${PROTOBUF_HOST_PREFIX}/lib/cmake/utf8_range") set(PROTOBUF_HOST_INCLUDE_DIR "${PROTOBUF_HOST_PREFIX}/include") @@ -76,10 +71,10 @@ set(_FINDPACKAGE_CARES_CONFIG_DIR "${INSTALL_DIR}/lib/cmake/c-ares") set(_FINDPACKAGE_CARES_LIBRARY_DIR "${INSTALL_DIR}/lib") set(_FINDPACKAGE_CARES_INCLUDE_DIR "${INSTALL_DIR}/include") -# gRPC -ExternalProject_Add(grpc - PREFIX grpc - SOURCE_DIR "${THIRDPARTY_DIR}/grpc" +# Protobuf +ExternalProject_Add(protobuf + PREFIX protobuf + SOURCE_DIR "${THIRDPARTY_DIR}/protobuf" CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH= CMAKE_CACHE_ARGS @@ -87,48 +82,13 @@ ExternalProject_Add(grpc -DABSL_ENABLE_INSTALL:BOOL=ON -DBUILD_SHARED_LIBS:BOOL=OFF -DBUILD_TESTING:BOOL=OFF - -Dc-ares_DIR:PATH=${_FINDPACKAGE_CARES_CONFIG_DIR} - -DgRPC_BUILD_CODEGEN:BOOL=OFF - -DgRPC_BUILD_CSHARP_EXT:BOOL=OFF - -DgRPC_BUILD_GRPC_CPP_PLUGIN:BOOL=OFF - -DgRPC_BUILD_GRPC_CSHARP_PLUGIN:BOOL=OFF - -DgRPC_BUILD_GRPC_NODE_PLUGIN:BOOL=OFF - -DgRPC_BUILD_GRPC_OBJECTIVE_C_PLUGIN:BOOL=OFF - -DgRPC_BUILD_GRPC_PHP_PLUGIN:BOOL=OFF - -DgRPC_BUILD_GRPC_PYTHON_PLUGIN:BOOL=OFF - -DgRPC_BUILD_GRPC_RUBY_PLUGIN:BOOL=OFF - -DgRPC_CARES_PROVIDER:STRING=package - -DgRPC_INSTALL:BOOL=ON - -DgRPC_SSL_PROVIDER:STRING=package - -DgRPC_ZLIB_PROVIDER:STRING=package - -Dprotobuf_ABSL_PROVIDER:STRING=package -Dprotobuf_MODULE_COMPATIBLE:BOOL=ON -Dprotobuf_MSVC_STATIC_RUNTIME:BOOL=ON - -DRE2_BUILD_TESTING:BOOL=OFF - -DZLIB_ROOT:PATH=${ZLIB_ROOT} - -DZLIB_USE_STATIC_LIBS:BOOL=ON - -DABSL_PROPAGATE_CXX_STD:BOOL=ON - ${_OPENSSL_CACHE_ARGS} - DEPENDS openssl zlib cares ) - -ExternalProject_Get_Property(grpc INSTALL_DIR) - -# absl +ExternalProject_Get_Property(protobuf INSTALL_DIR) set(absl_DIR "${INSTALL_DIR}/lib/cmake/absl") - -# utf8_range set(utf8_range_DIR "${INSTALL_DIR}/lib/cmake/utf8_range") - -# Protobuf -if(MSVC) - set(Protobuf_DIR "${INSTALL_DIR}/cmake") -else() - set(Protobuf_DIR "${INSTALL_DIR}/lib/cmake/protobuf") -endif() - -set(Protobuf_LIBRARIES "${INSTALL_DIR}/lib") -set(Protobuf_INCLUDE_DIR "${INSTALL_DIR}/include") +set(Protobuf_DIR "${INSTALL_DIR}/lib/cmake/protobuf") # Snappy for RocksDB compression ExternalProject_Add(snappy @@ -368,7 +328,7 @@ ExternalProject_Add(libp2p ${_OPENSSL_CACHE_ARGS} ${_CMAKE_COMMON_CACHE_ARGS} -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}\ -I\ ${_FINDPACKAGE_GSL_INCLUDE_DIR}\ -I\ ${_FINDPACKAGE_SQLITE3_INCLUDE_DIR} - DEPENDS Boost Microsoft.GSL openssl cares ${PROTOBUF_TARGET} fmt yaml-cpp soralog tsl_hat_trie Boost.DI SQLiteModernCpp grpc + DEPENDS Boost Microsoft.GSL openssl cares ${PROTOBUF_TARGET} fmt yaml-cpp soralog tsl_hat_trie Boost.DI SQLiteModernCpp protobuf ) set(_FINDPACKAGE_libp2p_CONFIG_DIR "${CMAKE_CURRENT_BINARY_DIR}/libp2p/lib/cmake/libp2p") set(_FINDPACKAGE_libp2p_LIBRARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/libp2p/lib") @@ -458,7 +418,7 @@ ExternalProject_Add(ipfs-lite-cpp ${_BOOST_CACHE_ARGS} ${_OPENSSL_CACHE_ARGS} -DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}\ -I\ ${_FINDPACKAGE_GSL_INCLUDE_DIR} - DEPENDS Microsoft.GSL spdlog tsl_hat_trie libp2p grpc ${PROTOBUF_TARGET} rocksdb Boost.DI + DEPENDS Microsoft.GSL spdlog tsl_hat_trie libp2p protobuf ${PROTOBUF_TARGET} rocksdb Boost.DI ) set(_FINDPACKAGE_IPFS_LITE_CONFIG_DIR "${CMAKE_CURRENT_BINARY_DIR}/ipfs-lite-cpp/lib/cmake/ipfs-lite-cpp") set(_FINDPACKAGE_IPFS_LITE_LIBRARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/ipfs-lite-cpp/lib") @@ -611,8 +571,8 @@ ExternalProject_Add(protobuf-plugin INSTALL_DIR protobuf-plugin CMAKE_CACHE_ARGS -DCMAKE_INSTALL_PREFIX:PATH= - -Dabsl_DIR:PATH=${absl_HOST_DIR} -DCMAKE_BUILD_TYPE:STRING=Release + -Dabsl_DIR:PATH=${absl_HOST_DIR} -DProtobuf_DIR:PATH=${Protobuf_HOST_DIR} -Dprotobuf_MODULE_COMPATIBLE:BOOL=ON -DTW_USE_EXTERNAL_PROTOC:BOOL=TRUE @@ -653,7 +613,7 @@ ExternalProject_Add(wallet-core # building the correct config's artifact. PATCH_COMMAND ${CMAKE_COMMAND} -E rm -f "${THIRDPARTY_DIR}/wallet-core/rust/target/libwallet_core_rs.a" COMMAND ${_WALLET_CORE_GENERATE_SCRIPT} --target-os=${_WALLET_CORE_ARCH} --arch-abi=${WALLET_CORE_ARCH_ABI} --protobuf-dir=${PROTOBUF_HOST_PREFIX} --out-dir= --plugin-dir=${ProtobufPlugin_DIR}/bin --build-type=$ - DEPENDS Boost grpc openssl protobuf-plugin + DEPENDS Boost protobuf openssl protobuf-plugin BUILD_BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/wallet-core/lib/libTrustWalletCore.a" ) @@ -713,7 +673,7 @@ ExternalProject_Add(AsyncIOManager ${_BOOST_CACHE_ARGS} ${_OPENSSL_CACHE_ARGS} ${_CMAKE_COMMON_CACHE_ARGS} - DEPENDS libssh2 openssl ipfs-lite-cpp ipfs-bitswap-cpp grpc ${PROTOBUF_TARGET} Boost MNN + DEPENDS libssh2 openssl ipfs-lite-cpp ipfs-bitswap-cpp protobuf ${PROTOBUF_TARGET} Boost MNN ) # gnus_upnp diff --git a/grpc b/grpc deleted file mode 160000 index 9713d459..00000000 --- a/grpc +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9713d459ed9a4716dccf8e69a9fff58bff684812 diff --git a/protobuf b/protobuf new file mode 160000 index 00000000..6a6cd88c --- /dev/null +++ b/protobuf @@ -0,0 +1 @@ +Subproject commit 6a6cd88c262ffdb1738167a47d5fcc7a3eb4edac diff --git a/wallet-core b/wallet-core index 58e659a6..53f650c5 160000 --- a/wallet-core +++ b/wallet-core @@ -1 +1 @@ -Subproject commit 58e659a6b928bc67bc83641a93e1d92b5a2c6f01 +Subproject commit 53f650c5b699a2c01b98eeb891792fbb4db45b02 From e3ba56b3d8eebd844585f389bedc9f30c6f799b1 Mon Sep 17 00:00:00 2001 From: Eduardo Menges Mattje Date: Thu, 12 Mar 2026 13:21:18 -0300 Subject: [PATCH 10/18] Shallow checkout --- .github/workflows/build-targets.yml | 2 +- .github/workflows/build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-targets.yml b/.github/workflows/build-targets.yml index efba25a8..15260776 100644 --- a/.github/workflows/build-targets.yml +++ b/.github/workflows/build-targets.yml @@ -254,7 +254,7 @@ jobs: uses: actions/checkout@v4 - name: Parallel checkout submodules - run: git submodule update --init --recursive --jobs 4 + run: git submodule update --init --recursive --jobs 4 --depth 1 - name: Configure Linux host if: ${{ runner.os == 'Linux'}} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ba82331c..525074ef 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -103,7 +103,7 @@ jobs: uses: actions/checkout@v4 - name: Parallel checkout submodules - run: git submodule update --init --recursive --jobs 4 + run: git submodule update --init --recursive --jobs 4 --depth 1 - name: Configure Linux host if: ${{ runner.os == 'Linux'}} From a78ec471ee54bebc0d5111d23db9bfd765ca0e25 Mon Sep 17 00:00:00 2001 From: Eduardo Menges Mattje Date: Thu, 12 Mar 2026 16:11:06 -0300 Subject: [PATCH 11/18] Increased workers in checkout --- .github/workflows/build-targets.yml | 2 +- .github/workflows/build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-targets.yml b/.github/workflows/build-targets.yml index 15260776..13a3970c 100644 --- a/.github/workflows/build-targets.yml +++ b/.github/workflows/build-targets.yml @@ -254,7 +254,7 @@ jobs: uses: actions/checkout@v4 - name: Parallel checkout submodules - run: git submodule update --init --recursive --jobs 4 --depth 1 + run: git submodule update --init --recursive --jobs 8 --depth 1 - name: Configure Linux host if: ${{ runner.os == 'Linux'}} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 525074ef..ee7d7cd5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -103,7 +103,7 @@ jobs: uses: actions/checkout@v4 - name: Parallel checkout submodules - run: git submodule update --init --recursive --jobs 4 --depth 1 + run: git submodule update --init --recursive --jobs 8 --depth 1 - name: Configure Linux host if: ${{ runner.os == 'Linux'}} From d713bdcce17c8452051d7630195cde4f8a28bc2a Mon Sep 17 00:00:00 2001 From: Eduardo Menges Mattje Date: Thu, 12 Mar 2026 17:03:27 -0300 Subject: [PATCH 12/18] Reduced workers again for network balancing --- .github/workflows/build-targets.yml | 2 +- .github/workflows/build.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-targets.yml b/.github/workflows/build-targets.yml index 13a3970c..9bda9a86 100644 --- a/.github/workflows/build-targets.yml +++ b/.github/workflows/build-targets.yml @@ -254,7 +254,7 @@ jobs: uses: actions/checkout@v4 - name: Parallel checkout submodules - run: git submodule update --init --recursive --jobs 8 --depth 1 + run: git submodule update --init --recursive --jobs 6 --depth 1 - name: Configure Linux host if: ${{ runner.os == 'Linux'}} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ee7d7cd5..efad93a6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -103,7 +103,7 @@ jobs: uses: actions/checkout@v4 - name: Parallel checkout submodules - run: git submodule update --init --recursive --jobs 8 --depth 1 + run: git submodule update --init --recursive --jobs 6 --depth 1 - name: Configure Linux host if: ${{ runner.os == 'Linux'}} From b1bf09badb1277e7b1081029edd7c8320d05d893 Mon Sep 17 00:00:00 2001 From: Super Genius Date: Thu, 12 Mar 2026 13:58:55 -0700 Subject: [PATCH 13/18] Fixed where asm files can build arm64+x86_64 in boost and be used for fcontext --- build/Android/CMakeLists.txt | 43 +++++++++++++++++-------------- build/CommonCompilerOptions.CMake | 3 ++- build/Linux/CMakeLists.txt | 23 ++++++++++++++++- build/OSX/CMakeLists.txt | 5 +++- build/Windows/CMakeLists.txt | 3 ++- build/iOS/CMakeLists.txt | 24 ++++++++++++++++- 6 files changed, 76 insertions(+), 25 deletions(-) diff --git a/build/Android/CMakeLists.txt b/build/Android/CMakeLists.txt index 330bebbc..d5463351 100644 --- a/build/Android/CMakeLists.txt +++ b/build/Android/CMakeLists.txt @@ -52,28 +52,29 @@ ExternalProject_Add(Boost CONFIGURE_COMMAND "" PATCH_COMMAND "" - BUILD_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/Boost-for-Android/build-android.sh ${CMAKE_ANDROID_NDK} --src-dir="${THIRDPARTY_DIR}/boost" --boost="${BOOST_VERSION}" --arch="${ANDROID_ABI}" --target-version="${ANDROID_PLATFORM_LEVEL}" --prefix="${BOOST_ROOT}" --with-libraries="${BOOST_INCLUDE_LIBRARIES_COMMA_SEPARATED}" --extra="--build-type=minimal,visibility=global,cxxstd=${CMAKE_CXX_STANDARD},-d0" + BUILD_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/Boost-for-Android/build-android.sh ${CMAKE_ANDROID_NDK} --src-dir="${THIRDPARTY_DIR}/boost" --boost="${BOOST_VERSION}" --arch="${ANDROID_ABI}" --target-version="${ANDROID_PLATFORM_LEVEL}" --prefix="${BOOST_ROOT}" --with-libraries="${BOOST_INCLUDE_LIBRARIES_COMMA_SEPARATED}" --extra="--build-type=minimal,visibility=global,cxxstd=${CMAKE_CXX_STANDARD},-d0,${BOOST_B2_EXTRA_FLAGS}" INSTALL_COMMAND "" UPDATE_COMMAND "" -# TODO: fix this so that ninja parallel build will work -# BUILD_BYPRODUCTS -# "${BOOST_ROOT}/lib/libboost_container.a" -# "${BOOST_ROOT}/lib/libboost_program_options.a" -# "${BOOST_ROOT}/lib/libboost_random.a" -# "${BOOST_ROOT}/lib/libboost_regex.a" -# "${BOOST_ROOT}/lib/libboost_system.a" -# "${BOOST_ROOT}/lib/libboost_prg_exec_monitor.a" -# "${BOOST_ROOT}/lib/libboost_test_exec_monitor.a" -# "${BOOST_ROOT}/lib/libboost_unit_test_framework.a" -# "${BOOST_ROOT}/lib/libboost_timer.a" -# "${BOOST_ROOT}/lib/libboost_date_time.a" -# "${BOOST_ROOT}/lib/libboost_atomic.a" -# "${BOOST_ROOT}/lib/libboost_filesystem.a" -# "${BOOST_ROOT}/lib/libboost_json.a" -# "${BOOST_ROOT}/lib/libboost_thread.a" -# "${BOOST_ROOT}/lib/libboost_chrono.a" -# "${BOOST_ROOT}/lib/libboost_log.a" -# "${BOOST_ROOT}/lib/libboost_log_setup.a" + BUILD_BYPRODUCTS + "${BOOST_ROOT}/lib/libboost_container.a" + "${BOOST_ROOT}/lib/libboost_program_options.a" + "${BOOST_ROOT}/lib/libboost_random.a" + "${BOOST_ROOT}/lib/libboost_regex.a" + "${BOOST_ROOT}/lib/libboost_system.a" + "${BOOST_ROOT}/lib/libboost_prg_exec_monitor.a" + "${BOOST_ROOT}/lib/libboost_test_exec_monitor.a" + "${BOOST_ROOT}/lib/libboost_unit_test_framework.a" + "${BOOST_ROOT}/lib/libboost_timer.a" + "${BOOST_ROOT}/lib/libboost_date_time.a" + "${BOOST_ROOT}/lib/libboost_atomic.a" + "${BOOST_ROOT}/lib/libboost_filesystem.a" + "${BOOST_ROOT}/lib/libboost_json.a" + "${BOOST_ROOT}/lib/libboost_thread.a" + "${BOOST_ROOT}/lib/libboost_chrono.a" + "${BOOST_ROOT}/lib/libboost_log.a" + "${BOOST_ROOT}/lib/libboost_log_setup.a" + "${BOOST_ROOT}/lib/libboost_context.a" + "${BOOST_ROOT}/lib/libboost_coroutine.a" ) set(Boost_DIR "${BOOST_ROOT}/lib/cmake/Boost-${BOOST_VERSION}") @@ -93,6 +94,7 @@ set(boost_log_setup_DIR "${BOOST_ROOT}/lib/cmake/boost_log_setup-${BOOST_VERSION set(boost_container_DIR "${BOOST_ROOT}/lib/cmake/boost_container-${BOOST_VERSION}") set(boost_unit_test_framework_DIR "${BOOST_ROOT}/lib/cmake/boost_unit_test_framework-${BOOST_VERSION}") set(boost_context_DIR "${BOOST_ROOT}/lib/cmake/boost_context-${BOOST_VERSION}") +set(boost_coroutine_DIR "${BOOST_ROOT}/lib/cmake/boost_coroutine-${BOOST_VERSION}") set(_BOOST_CACHE_ARGS -DBOOST_ROOT:PATH=${BOOST_ROOT} @@ -117,6 +119,7 @@ set(_BOOST_CACHE_ARGS -Dboost_thread_DIR:PATH=${boost_thread_DIR} -Dboost_unit_test_framework_DIR:PATH=${boost_unit_test_framework_DIR} -Dboost_context_DIR:PATH=${boost_context_DIR} + -Dboost_coroutine_DIR:PATH=${boost_coroutine_DIR} -DBoost_COMPILER:STRING=clang ) diff --git a/build/CommonCompilerOptions.CMake b/build/CommonCompilerOptions.CMake index bfe0459b..afc2f71c 100644 --- a/build/CommonCompilerOptions.CMake +++ b/build/CommonCompilerOptions.CMake @@ -91,11 +91,12 @@ if(NOT EXISTS "${THIRDPARTY_DIR}/build") endif() # Boost settings -set(BOOST_INCLUDE_LIBRARIES container date_time filesystem json log program_options random regex system test timer context) +set(BOOST_INCLUDE_LIBRARIES container date_time filesystem json log program_options random regex system test timer context coroutine) list(JOIN BOOST_INCLUDE_LIBRARIES "," BOOST_INCLUDE_LIBRARIES_COMMA_SEPARATED) separate_arguments(BOOST_B2_FLAGS NATIVE_COMMAND "${CMAKE_CXX_FLAGS}") list(APPEND BOOST_B2_FLAGS "-fPIC") +set(BOOST_B2_EXTRA_FLAGS "context-impl=fcontext") list(TRANSFORM BOOST_B2_FLAGS PREPEND "cxxflags=") # OpenSSL diff --git a/build/Linux/CMakeLists.txt b/build/Linux/CMakeLists.txt index c397b2a6..f7b1ded7 100644 --- a/build/Linux/CMakeLists.txt +++ b/build/Linux/CMakeLists.txt @@ -24,10 +24,31 @@ ExternalProject_Add(Boost CONFIGURE_COMMAND /bootstrap.sh --with-toolset=clang --with-libraries=${BOOST_INCLUDE_LIBRARIES_COMMA_SEPARATED} --prefix=${BOOST_ROOT} - BUILD_COMMAND /b2${CMAKE_EXECUTABLE_SUFFIX} ${BOOST_B2_FLAGS} cxxstd=${CMAKE_CXX_STANDARD} visibility=global runtime-link=static link=static threading=multi --build-type=minimal address-model=64 ${BOOST_ARCH_FLAGS} variant=${BOOST_VARIANT} --prefix= -d0 -j4 install + BUILD_COMMAND /b2${CMAKE_EXECUTABLE_SUFFIX} ${BOOST_B2_FLAGS} ${BOOST_B2_EXTRA_FLAGS} cxxstd=${CMAKE_CXX_STANDARD} visibility=global runtime-link=static link=static threading=multi --build-type=minimal address-model=64 ${BOOST_ARCH_FLAGS} variant=${BOOST_VARIANT} --prefix= -d0 install BUILD_IN_SOURCE TRUE INSTALL_COMMAND "" + BUILD_BYPRODUCTS + "${BOOST_ROOT}/lib/libboost_container.a" + "${BOOST_ROOT}/lib/libboost_program_options.a" + "${BOOST_ROOT}/lib/libboost_random.a" + "${BOOST_ROOT}/lib/libboost_regex.a" + "${BOOST_ROOT}/lib/libboost_system.a" + "${BOOST_ROOT}/lib/libboost_prg_exec_monitor.a" + "${BOOST_ROOT}/lib/libboost_test_exec_monitor.a" + "${BOOST_ROOT}/lib/libboost_unit_test_framework.a" + "${BOOST_ROOT}/lib/libboost_timer.a" + "${BOOST_ROOT}/lib/libboost_date_time.a" + "${BOOST_ROOT}/lib/libboost_atomic.a" + "${BOOST_ROOT}/lib/libboost_filesystem.a" + "${BOOST_ROOT}/lib/libboost_json.a" + "${BOOST_ROOT}/lib/libboost_thread.a" + "${BOOST_ROOT}/lib/libboost_chrono.a" + "${BOOST_ROOT}/lib/libboost_log.a" + "${BOOST_ROOT}/lib/libboost_log_setup.a" + "${BOOST_ROOT}/lib/libboost_context.a" + "${BOOST_ROOT}/lib/libboost_coroutine.a" + ) set(Boost_DIR "${BOOST_ROOT}/lib/cmake/Boost-${BOOST_VERSION}") diff --git a/build/OSX/CMakeLists.txt b/build/OSX/CMakeLists.txt index abf8f2f4..2a750cd1 100644 --- a/build/OSX/CMakeLists.txt +++ b/build/OSX/CMakeLists.txt @@ -39,7 +39,7 @@ ExternalProject_Add(Boost CONFIGURE_COMMAND ${CMAKE_COMMAND} -E env MACOSX_DEPLOYMENT_TARGET=${DEPLOYMENT_TARGET} /bootstrap.sh --with-toolset=clang --with-libraries=${BOOST_INCLUDE_LIBRARIES_COMMA_SEPARATED} --prefix=${BOOST_ROOT} - BUILD_COMMAND ${CMAKE_COMMAND} -E env MACOSX_DEPLOYMENT_TARGET=${DEPLOYMENT_TARGET} /b2${CMAKE_EXECUTABLE_SUFFIX} ${BOOST_B2_FLAGS} toolset=clang cxxstd=${CMAKE_CXX_STANDARD} visibility=global runtime-link=static link=static threading=multi --build-type=minimal address-model=64 architecture=${BOOST_ARCH} variant=${BOOST_VARIANT} --prefix=${BOOST_ROOT} -j4 install + BUILD_COMMAND ${CMAKE_COMMAND} -E env MACOSX_DEPLOYMENT_TARGET=${DEPLOYMENT_TARGET} /b2${CMAKE_EXECUTABLE_SUFFIX} ${BOOST_B2_FLAGS} ${BOOST_B2_EXTRA_FLAGS} toolset=clang cxxstd=${CMAKE_CXX_STANDARD} abi=sysv visibility=global runtime-link=static link=static threading=multi --build-type=minimal address-model=64 architecture=${BOOST_ARCH} variant=${BOOST_VARIANT} --prefix=${BOOST_ROOT} install BUILD_IN_SOURCE TRUE INSTALL_COMMAND "" @@ -62,6 +62,7 @@ ExternalProject_Add(Boost "${BOOST_ROOT}/lib/libboost_log.a" "${BOOST_ROOT}/lib/libboost_log_setup.a" "${BOOST_ROOT}/lib/libboost_context.a" + "${BOOST_ROOT}/lib/libboost_coroutine.a" ) @@ -75,6 +76,7 @@ set(boost_random_DIR "${BOOST_ROOT}/lib/cmake/boost_random-${BOOST_VERSION}") set(boost_regex_DIR "${BOOST_ROOT}/lib/cmake/boost_regex-${BOOST_VERSION}") set(boost_system_DIR "${BOOST_ROOT}/lib/cmake/boost_system-${BOOST_VERSION}") set(boost_context_DIR "${BOOST_ROOT}/lib/cmake/boost_context-${BOOST_VERSION}") +set(boost_coroutine_DIR "${BOOST_ROOT}/lib/cmake/boost_coroutine-${BOOST_VERSION}") set(_BOOST_CACHE_ARGS -DBOOST_ROOT:PATH=${BOOST_ROOT} @@ -88,6 +90,7 @@ set(_BOOST_CACHE_ARGS -Dboost_regex_DIR:PATH=${boost_regex_DIR} -Dboost_system_DIR:PATH=${boost_system_DIR} -Dboost_context_DIR:PATH=${boost_context_DIR} + -Dboost_coroutine_DIR:PATH=${boost_coroutine_DIR} -DBoost_NO_SYSTEM_PATHS:BOOL=ON -DBoost_USE_MULTITHREADED:BOOL=ON -DBoost_USE_STATIC_LIBS:BOOL=ON diff --git a/build/Windows/CMakeLists.txt b/build/Windows/CMakeLists.txt index 37eea8ee..589ca749 100644 --- a/build/Windows/CMakeLists.txt +++ b/build/Windows/CMakeLists.txt @@ -31,7 +31,7 @@ ExternalProject_Add(Boost CONFIGURE_COMMAND ./bootstrap.bat vc143 - BUILD_COMMAND /b2${CMAKE_EXECUTABLE_SUFFIX} cxxstd=${CMAKE_CXX_STANDARD} visibility=global runtime-link=static link=static threading=multi --build-type=minimal ${BOOST_INCLUDE_LIBRARIES_EXPANDED} address-model=64 architecture=x86 variant=${BOOST_VARIANT} --prefix=${BOOST_ROOT} -d0 -j4 install + BUILD_COMMAND /b2${CMAKE_EXECUTABLE_SUFFIX} cxxstd=${CMAKE_CXX_STANDARD} visibility=global runtime-link=static link=static threading=multi --build-type=minimal ${BOOST_INCLUDE_LIBRARIES_EXPANDED} address-model=64 architecture=x86 variant=${BOOST_VARIANT} --prefix=${BOOST_ROOT} -d0 ${BOOST_B2_EXTRA_FLAGS} install BUILD_IN_SOURCE TRUE PATCH_COMMAND @@ -58,6 +58,7 @@ set(_BOOST_CACHE_ARGS -Dboost_regex_DIR:PATH=${Boost_DIR}/boost_regex-${BOOST_VERSION} -Dboost_system_DIR:PATH=${Boost_DIR}/boost_system-${BOOST_VERSION} -Dboost_context_DIR:PATH=${Boost_DIR}/boost_context-${BOOST_VERSION} + -Dboost_coroutine_DIR:PATH=${Boost_DIR}/boost_coroutine-${BOOST_VERSION} -DBoost_NO_SYSTEM_PATHS:BOOL=ON -DBoost_USE_MULTITHREADED:BOOL=ON -DBoost_USE_STATIC_LIBS:BOOL=ON diff --git a/build/iOS/CMakeLists.txt b/build/iOS/CMakeLists.txt index aafb7d70..c96317fe 100644 --- a/build/iOS/CMakeLists.txt +++ b/build/iOS/CMakeLists.txt @@ -42,10 +42,30 @@ ExternalProject_Add(Boost CONFIGURE_COMMAND /bootstrap.sh --with-toolset=clang --with-libraries=${BOOST_INCLUDE_LIBRARIES_COMMA_SEPARATED} --prefix=${BOOST_ROOT} - BUILD_COMMAND /b2${CMAKE_EXECUTABLE_SUFFIX} ${BOOST_B2_FLAGS} cxxstd=${CMAKE_CXX_STANDARD} toolset=darwin target-os=iphone visibility=global runtime-link=static link=static threading=multi --build-type=minimal address-model=64 architecture=arm variant=${BOOST_VARIANT} --prefix= -d0 -j4 install + BUILD_COMMAND /b2${CMAKE_EXECUTABLE_SUFFIX} ${BOOST_B2_FLAGS} ${BOOST_B2_EXTRA_FLAGS} cxxstd=${CMAKE_CXX_STANDARD} toolset=darwin target-os=iphone visibility=global runtime-link=static link=static threading=multi --build-type=minimal address-model=64 architecture=arm variant=${BOOST_VARIANT} --prefix= -d0 install BUILD_IN_SOURCE TRUE INSTALL_COMMAND "" + BUILD_BYPRODUCTS + "${BOOST_ROOT}/lib/libboost_container.a" + "${BOOST_ROOT}/lib/libboost_program_options.a" + "${BOOST_ROOT}/lib/libboost_random.a" + "${BOOST_ROOT}/lib/libboost_regex.a" + "${BOOST_ROOT}/lib/libboost_system.a" + "${BOOST_ROOT}/lib/libboost_prg_exec_monitor.a" + "${BOOST_ROOT}/lib/libboost_test_exec_monitor.a" + "${BOOST_ROOT}/lib/libboost_unit_test_framework.a" + "${BOOST_ROOT}/lib/libboost_timer.a" + "${BOOST_ROOT}/lib/libboost_date_time.a" + "${BOOST_ROOT}/lib/libboost_atomic.a" + "${BOOST_ROOT}/lib/libboost_filesystem.a" + "${BOOST_ROOT}/lib/libboost_json.a" + "${BOOST_ROOT}/lib/libboost_thread.a" + "${BOOST_ROOT}/lib/libboost_chrono.a" + "${BOOST_ROOT}/lib/libboost_log.a" + "${BOOST_ROOT}/lib/libboost_log_setup.a" + "${BOOST_ROOT}/lib/libboost_context.a" + "${BOOST_ROOT}/lib/libboost_coroutine.a" ) set(Boost_DIR "${BOOST_ROOT}/lib/cmake/Boost-${BOOST_VERSION}") @@ -58,6 +78,7 @@ set(boost_program_options_DIR "${BOOST_ROOT}/lib/cmake/boost_program_options-${B set(boost_regex_DIR "${BOOST_ROOT}/lib/cmake/boost_regex-${BOOST_VERSION}") set(boost_date_time_DIR "${BOOST_ROOT}/lib/cmake/boost_date_time-${BOOST_VERSION}") set(boost_context_DIR "${BOOST_ROOT}/lib/cmake/boost_context-${BOOST_VERSION}") +set(boost_coroutine_DIR "${BOOST_ROOT}/lib/cmake/boost_coroutine-${BOOST_VERSION}") set(_BOOST_CACHE_ARGS -DBOOST_ROOT:PATH=${BOOST_ROOT} @@ -75,6 +96,7 @@ set(_BOOST_CACHE_ARGS -Dboost_regex_DIR:PATH=${boost_regex_DIR} -Dboost_system_DIR:PATH=${boost_system_DIR} -Dboost_context_DIR:PATH=${boost_context_DIR} + -Dboost_coroutine_DIR:PATH=${boost_coroutine_DIR} ) # OpenSSL From 16003543966e904e48bfe83455f04ae226e3a450 Mon Sep 17 00:00:00 2001 From: itsafuu Date: Thu, 12 Mar 2026 21:30:10 -0400 Subject: [PATCH 14/18] Fix android context/coroutine compilation --- build/Android/CMakeLists.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/build/Android/CMakeLists.txt b/build/Android/CMakeLists.txt index d5463351..b73280ab 100644 --- a/build/Android/CMakeLists.txt +++ b/build/Android/CMakeLists.txt @@ -43,6 +43,13 @@ set(_CMAKE_COMMON_CACHE_ARGS ${_CMAKE_COMMON_CACHE_ARGS} -DOPENSSL_USE_STATIC_LIBS:BOOL=TRUE ) +set(BOOST_ANDROID_B2_EXTRA_FLAGS "") +if(ANDROID_ABI STREQUAL "arm64-v8a") + set(BOOST_ANDROID_B2_EXTRA_FLAGS "architecture=arm,address-model=64,abi=aapcs,binary-format=elf") +elseif(ANDROID_ABI STREQUAL "armeabi-v7a") + set(BOOST_ANDROID_B2_EXTRA_FLAGS "architecture=arm,address-model=32,abi=aapcs,binary-format=elf") +endif() + # Boost set(BOOST_ROOT "${CMAKE_CURRENT_BINARY_DIR}/boost/build") ExternalProject_Add(Boost @@ -52,7 +59,7 @@ ExternalProject_Add(Boost CONFIGURE_COMMAND "" PATCH_COMMAND "" - BUILD_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/Boost-for-Android/build-android.sh ${CMAKE_ANDROID_NDK} --src-dir="${THIRDPARTY_DIR}/boost" --boost="${BOOST_VERSION}" --arch="${ANDROID_ABI}" --target-version="${ANDROID_PLATFORM_LEVEL}" --prefix="${BOOST_ROOT}" --with-libraries="${BOOST_INCLUDE_LIBRARIES_COMMA_SEPARATED}" --extra="--build-type=minimal,visibility=global,cxxstd=${CMAKE_CXX_STANDARD},-d0,${BOOST_B2_EXTRA_FLAGS}" + BUILD_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/Boost-for-Android/build-android.sh ${CMAKE_ANDROID_NDK} --src-dir="${THIRDPARTY_DIR}/boost" --boost="${BOOST_VERSION}" --arch="${ANDROID_ABI}" --target-version="${ANDROID_PLATFORM_LEVEL}" --prefix="${BOOST_ROOT}" --with-libraries="${BOOST_INCLUDE_LIBRARIES_COMMA_SEPARATED}" --extra="--build-type=minimal,visibility=global,cxxstd=${CMAKE_CXX_STANDARD},-d0,${BOOST_B2_EXTRA_FLAGS},${BOOST_ANDROID_B2_EXTRA_FLAGS}" INSTALL_COMMAND "" UPDATE_COMMAND "" BUILD_BYPRODUCTS From 3973cdcbc4f317c171b2535b09f2b7cd0e3f3300 Mon Sep 17 00:00:00 2001 From: Super Genius Date: Fri, 13 Mar 2026 11:54:41 -0700 Subject: [PATCH 15/18] Fixes building boost asm files with target of iOS instead of default OSX, simple as passing cflags= for it --- build/iOS/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build/iOS/CMakeLists.txt b/build/iOS/CMakeLists.txt index c96317fe..3cc22778 100644 --- a/build/iOS/CMakeLists.txt +++ b/build/iOS/CMakeLists.txt @@ -35,6 +35,9 @@ set(_CMAKE_COMMON_CACHE_ARGS ${_CMAKE_COMMON_CACHE_ARGS} # Boost set(BOOST_ROOT "${CMAKE_CURRENT_BINARY_DIR}/boost/build") +set(BOOST_IOS_ASM_B2_FLAGS ${BOOST_B2_FLAGS}) +list(TRANSFORM BOOST_IOS_ASM_B2_FLAGS REPLACE "^cxxflags=" "cflags=") + ExternalProject_Add(Boost PREFIX boost SOURCE_DIR "${THIRDPARTY_DIR}/boost" @@ -42,7 +45,7 @@ ExternalProject_Add(Boost CONFIGURE_COMMAND /bootstrap.sh --with-toolset=clang --with-libraries=${BOOST_INCLUDE_LIBRARIES_COMMA_SEPARATED} --prefix=${BOOST_ROOT} - BUILD_COMMAND /b2${CMAKE_EXECUTABLE_SUFFIX} ${BOOST_B2_FLAGS} ${BOOST_B2_EXTRA_FLAGS} cxxstd=${CMAKE_CXX_STANDARD} toolset=darwin target-os=iphone visibility=global runtime-link=static link=static threading=multi --build-type=minimal address-model=64 architecture=arm variant=${BOOST_VARIANT} --prefix= -d0 install + BUILD_COMMAND /b2${CMAKE_EXECUTABLE_SUFFIX} ${BOOST_B2_FLAGS} ${BOOST_IOS_ASM_B2_FLAGS} ${BOOST_B2_EXTRA_FLAGS} cxxstd=${CMAKE_CXX_STANDARD} toolset=darwin target-os=iphone visibility=global runtime-link=static link=static threading=multi --build-type=minimal address-model=64 architecture=arm variant=${BOOST_VARIANT} --prefix= -d0 install BUILD_IN_SOURCE TRUE INSTALL_COMMAND "" From 2e0fa6e1daa767c803466d9e480974356012f4a3 Mon Sep 17 00:00:00 2001 From: Eduardo Menges Mattje Date: Fri, 13 Mar 2026 14:50:11 -0300 Subject: [PATCH 16/18] Updated dependencies --- .gitmodules | 5 +---- GTest | 2 +- build/CommonTargets.CMake | 12 ------------ c-ares | 2 +- curl-android-ios | 1 - hat-trie | 2 +- ipfs-bitswap-cpp | 2 +- libsecp256k1 | 2 +- libssh2 | 2 +- zlib | 2 +- 10 files changed, 8 insertions(+), 24 deletions(-) delete mode 160000 curl-android-ios diff --git a/.gitmodules b/.gitmodules index 9dcd3d1a..31574571 100644 --- a/.gitmodules +++ b/.gitmodules @@ -12,9 +12,6 @@ [submodule "flutter"] path = flutter url = https://github.com/flutter/flutter.git -[submodule "curl-android-ios"] - path = curl-android-ios - url = https://github.com/gcesarmza/curl-android-ios.git [submodule "GSL"] path = GSL url = ../GSL.git @@ -23,7 +20,7 @@ url = https://github.com/gabime/spdlog [submodule "hat-trie"] path = hat-trie - url = https://github.com/masterjedy/hat-trie + url = https://github.com/Tessil/hat-trie.git [submodule "Boost.DI"] path = Boost.DI url = ../Boost.DI diff --git a/GTest b/GTest index b796f7d4..52eb8108 160000 --- a/GTest +++ b/GTest @@ -1 +1 @@ -Subproject commit b796f7d44681514f58a683a3a71ff17c94edb0c1 +Subproject commit 52eb8108c5bdec04579160ae17225d66034bd723 diff --git a/build/CommonTargets.CMake b/build/CommonTargets.CMake index e76cdc2e..1e986c93 100644 --- a/build/CommonTargets.CMake +++ b/build/CommonTargets.CMake @@ -508,18 +508,6 @@ ExternalProject_Add(ed25519 ) set(_FINDPACKAGE_ed25519_CONFIG_DIR "${CMAKE_CURRENT_BINARY_DIR}/ed25519/lib/cmake/ed25519") -# sr25519-donna -ExternalProject_Add(sr25519-donna - PREFIX sr25519-donna - SOURCE_DIR "${THIRDPARTY_DIR}/sr25519-donna" - CMAKE_CACHE_ARGS - -DCMAKE_INSTALL_PREFIX:PATH= - -DTESTING:BOOL=OFF - -DBUILD_SHARED_LIBS:BOOL=OFF - -DHASH_USE_SHA3_BRAINHUB:BOOL=ON - ${_CMAKE_COMMON_CACHE_ARGS} -) - # RapidJSON ExternalProject_Add(rapidjson PREFIX rapidjson diff --git a/c-ares b/c-ares index bf4c5fd2..3ac47ee4 160000 --- a/c-ares +++ b/c-ares @@ -1 +1 @@ -Subproject commit bf4c5fd223e71776e3d0c5a6a8d5598ffb82597c +Subproject commit 3ac47ee46edd8ea40370222f91613fc16c434853 diff --git a/curl-android-ios b/curl-android-ios deleted file mode 160000 index da6f0d23..00000000 --- a/curl-android-ios +++ /dev/null @@ -1 +0,0 @@ -Subproject commit da6f0d2302ce7a9ea560871fe9e6e86398d5b584 diff --git a/hat-trie b/hat-trie index 343e0dac..f1380d70 160000 --- a/hat-trie +++ b/hat-trie @@ -1 +1 @@ -Subproject commit 343e0dac54fc8491065e8a059a02db9a2b1248ab +Subproject commit f1380d704eccf753db5f9df175789fff8ff353e0 diff --git a/ipfs-bitswap-cpp b/ipfs-bitswap-cpp index ab22bb1d..20d7d6c6 160000 --- a/ipfs-bitswap-cpp +++ b/ipfs-bitswap-cpp @@ -1 +1 @@ -Subproject commit ab22bb1d03f7ca734991fcbb36bcf81adf6e0381 +Subproject commit 20d7d6c6da132958942ac96cea9492fa3e49e9db diff --git a/libsecp256k1 b/libsecp256k1 index 0cdc758a..1a53f496 160000 --- a/libsecp256k1 +++ b/libsecp256k1 @@ -1 +1 @@ -Subproject commit 0cdc758a56360bf58a851fe91085a327ec97685a +Subproject commit 1a53f4961f337b4d166c25fce72ef0dc88806618 diff --git a/libssh2 b/libssh2 index cd61734d..a312b433 160000 --- a/libssh2 +++ b/libssh2 @@ -1 +1 @@ -Subproject commit cd61734dad079a2bb9dbd598dfa654272a35d2d6 +Subproject commit a312b43325e3383c865a87bb1d26cb52e3292641 diff --git a/zlib b/zlib index 51b7f2ab..da607da7 160000 --- a/zlib +++ b/zlib @@ -1 +1 @@ -Subproject commit 51b7f2abdade71cd9bb0e7a373ef2610ec6f9daf +Subproject commit da607da739fa6047df13e66a2af6b8bec7c2a498 From 08c3206bcc31168f26cef719f240cea1764b2613 Mon Sep 17 00:00:00 2001 From: Eduardo Menges Mattje Date: Fri, 13 Mar 2026 14:52:48 -0300 Subject: [PATCH 17/18] Removed unused `sr25519_donna` --- .gitmodules | 3 --- sr25519-donna | 1 - yaml-cpp | 2 +- 3 files changed, 1 insertion(+), 5 deletions(-) delete mode 160000 sr25519-donna diff --git a/.gitmodules b/.gitmodules index 31574571..02b6a938 100644 --- a/.gitmodules +++ b/.gitmodules @@ -40,9 +40,6 @@ [submodule "rocksdb"] path = rocksdb url = ../rocksdb.git -[submodule "sr25519-donna"] - path = sr25519-donna - url = ../sr25519-donna.git [submodule "fmt"] path = fmt url = https://github.com/fmtlib/fmt.git diff --git a/sr25519-donna b/sr25519-donna deleted file mode 160000 index 987e2c54..00000000 --- a/sr25519-donna +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 987e2c54e56a29f0aac439d461dc24fcdcb51580 diff --git a/yaml-cpp b/yaml-cpp index 28f93bde..56e3bb55 160000 --- a/yaml-cpp +++ b/yaml-cpp @@ -1 +1 @@ -Subproject commit 28f93bdec6387d42332220afa9558060c8016795 +Subproject commit 56e3bb550c91fd7005566f19c079cb7a503223cf From 0e0bee96a6066f26d7c685eed276d0ad4f7fbc60 Mon Sep 17 00:00:00 2001 From: Eduardo Menges Mattje Date: Fri, 13 Mar 2026 16:30:23 -0300 Subject: [PATCH 18/18] `hat-trie` now uses its original repo --- .gitmodules | 2 +- hat-trie | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 02b6a938..5bc92e31 100644 --- a/.gitmodules +++ b/.gitmodules @@ -20,7 +20,7 @@ url = https://github.com/gabime/spdlog [submodule "hat-trie"] path = hat-trie - url = https://github.com/Tessil/hat-trie.git + url = https://github.com/masterjedy/hat-trie.git [submodule "Boost.DI"] path = Boost.DI url = ../Boost.DI diff --git a/hat-trie b/hat-trie index f1380d70..4fdfc75e 160000 --- a/hat-trie +++ b/hat-trie @@ -1 +1 @@ -Subproject commit f1380d704eccf753db5f9df175789fff8ff353e0 +Subproject commit 4fdfc75e75276185eed4b748ea09671601101b8e