From 1af1a3daea87e0b066fafec6526e139cdb55e329 Mon Sep 17 00:00:00 2001 From: Dmytro Kozhevin Date: Mon, 23 Dec 2024 15:17:49 -0500 Subject: [PATCH] Update the Visual Studio project - Add a script to build the Rust library that picks up the correct version from the toolchain - Prevent re-generating the XDR hashes - Fix some broken configurations - Remove some unnecessary duplication --- Builds/VisualStudio/build_rust.bat | 34 ++++++ Builds/VisualStudio/generate_rust_bridge.bat | 39 +++++++ Builds/VisualStudio/stellar-core.vcxproj | 110 +++++------------- .../VisualStudio/stellar-core.vcxproj.filters | 6 +- 4 files changed, 106 insertions(+), 83 deletions(-) create mode 100644 Builds/VisualStudio/build_rust.bat create mode 100644 Builds/VisualStudio/generate_rust_bridge.bat diff --git a/Builds/VisualStudio/build_rust.bat b/Builds/VisualStudio/build_rust.bat new file mode 100644 index 0000000000..4157b51980 --- /dev/null +++ b/Builds/VisualStudio/build_rust.bat @@ -0,0 +1,34 @@ +:: Builds the Rust libraries for all the host versions. +:: Expects the first argument to be the path to the Visual Studio's `$OutDir` varible, the second argment to be `debug`/`release` for the respective build modes, and the third argument may be `curr`/`next` for vcurr/vnext builds of the host. +@echo off + +set "project_dir=%~dp0..\.." +set "toolchain_file=%project_dir%\rust-toolchain.toml" +set "out_dir=%1\rust" +set features= +set release_profile= +set "set_linker_flags=cd ." +if "%2"=="debug" set "set_linker_flags=(set CFLAGS=-MDd) & (set CXXFLAGS=-MDd)" +if "%2"=="release" set "release_profile=--release" +if "%3"=="next" set "features=--features next" + +if not exist "%toolchain_file%" ( + echo Error: "%toolchain_file%" not found. + exit /b 1 +) + +:: Read the channel version from the file +for /f "tokens=2 delims==" %%A in ('findstr "channel" "%toolchain_file%"') do ( + set "version=%%~A" +) +:: Remove quotes from the version string +set "version=%version:~2,-1%" + +if "%version%"=="" ( + echo Error: Failed to extract the toolchain channel version. + exit /b 1 +) + +%set_linker_flags% & cd %project_dir%\src\rust\soroban\p21 & (set RUSTFLAGS=-Cmetadata=p21) & cargo +%version% build %release_profile% --package soroban-env-host --locked --target-dir %out_dir%\soroban-p21-target +%set_linker_flags% & cd %project_dir%\src\rust\soroban\p22 & (set RUSTFLAGS=-Cmetadata=p22) & cargo +%version% build %release_profile% --package soroban-env-host %features% --locked --target-dir %out_dir%\soroban-p22-target +cd %project_dir% & cargo +%version% rustc %release_profile% --package stellar-core --locked --target-dir %out_dir%\target -- --extern soroban_env_host_p21=%out_dir%\soroban-p21-target\%2\libsoroban_env_host.rlib --extern soroban_env_host_p22=%out_dir%\soroban-p22-target\%2\libsoroban_env_host.rlib -L dependency=%out_dir%\soroban-p21-target\%2\deps -L dependency=%out_dir%\soroban-p22-target\%2\deps diff --git a/Builds/VisualStudio/generate_rust_bridge.bat b/Builds/VisualStudio/generate_rust_bridge.bat new file mode 100644 index 0000000000..d240ce63bc --- /dev/null +++ b/Builds/VisualStudio/generate_rust_bridge.bat @@ -0,0 +1,39 @@ +:: Generates rust bridge header and source files in the src directory. +:: Expects the first argument to be the command line for `cxxbridge.cpp` +@echo off + +set "out_dir=src\generated\rust" +set "temp_header=%out_dir%\temp\RustBridge.h" +set "temp_source=%out_dir%\temp\RustBridge.cpp" +set "final_header=%out_dir%\RustBridge.h" +set "final_source=%out_dir%\RustBridge.cpp" + +mkdir "%out_dir%\temp" >nul 2>nul + +%1 ..\..\src\rust\src\lib.rs --cfg test=false --header --output "%temp_header%" +if %errorlevel% neq 0 ( + echo Error generating temporary header file. + exit /b %errorlevel% +) + +%1 ..\..\src\rust\src\lib.rs --cfg test=false --output "%temp_source%" +if %errorlevel% neq 0 ( + echo Error generating temporary source file. + exit /b %errorlevel% +) + +fc /b "%temp_header%" "%final_header%" >nul 2>nul +if %errorlevel% neq 0 ( + copy /y "%temp_header%" "%final_header%" >nul +) + +fc /b "%temp_source%" "%final_source%" >nul 2>nul +if %errorlevel% neq 0 ( + copy /y "%temp_source%" "%final_source%" >nul +) + +del "%temp_header%" >nul 2>nul +del "%temp_source%" >nul 2>nul + +:: Make sure we exit without an error +exit 0 \ No newline at end of file diff --git a/Builds/VisualStudio/stellar-core.vcxproj b/Builds/VisualStudio/stellar-core.vcxproj index 80364bd0cb..6cedfe0347 100644 --- a/Builds/VisualStudio/stellar-core.vcxproj +++ b/Builds/VisualStudio/stellar-core.vcxproj @@ -125,7 +125,7 @@ Disabled true CEREAL_THREAD_SAFE;USE_POSTGRES;ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION=1;USE_SPDLOG;FMT_HEADER_ONLY=1;BUILD_TESTS;WIN32_LEAN_AND_MEAN;NOMINMAX;ASIO_STANDALONE;_WINSOCK_DEPRECATED_NO_WARNINGS;SODIUM_STATIC;ASIO_SEPARATE_COMPILATION;ASIO_ERROR_CATEGORY_NOEXCEPT=noexcept;_CRT_SECURE_NO_WARNINGS;_WIN32_WINNT=0x0601;WIN32;_MBCS;_CRT_NONSTDC_NO_DEPRECATE;YY_NO_UNISTD_H;%(PreprocessorDefinitions) - src;../../src;../../lib;../../lib/tracy/public/tracy;../../lib/spdlog/include;../../lib/libmedida/src;../../lib/soci/src/core;../../lib/autocheck/include;../../lib/cereal/include;../../lib/asio/asio/include;../../lib/xdrpp;../../lib/libsodium/src/libsodium/include;../../lib/fmt/include;../../lib/util;../..;src/$(Configuration)/generated;../../lib/sqlite;c:\Program Files\PostgreSQL\15\include;%(AdditionalIncludeDirectories) + src;../../src;../../lib;../../lib/tracy/public/tracy;../../lib/spdlog/include;../../lib/libmedida/src;../../lib/soci/src/core;../../lib/autocheck/include;../../lib/cereal/include;../../lib/asio/asio/include;../../lib/xdrpp;../../lib/libsodium/src/libsodium/include;../../lib/fmt/include;../../lib/util;../..;src/$(Configuration)/generated;src/generated;../../lib/sqlite;c:\Program Files\PostgreSQL\15\include;%(AdditionalIncludeDirectories) true false 4060;4100;4127;4324;4408;4510;4512;4582;4583;4592 @@ -140,13 +140,11 @@ DebugFastLink - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;psapi.lib;Credui.lib;userenv.lib;bcrypt.lib;ntdll.lib;$(OutDir)\rust\target\release\rust_stellar_core.lib;C:\Program Files\PostgreSQL\15\lib\libpq.lib;%(AdditionalDependencies) + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;psapi.lib;Credui.lib;userenv.lib;bcrypt.lib;ntdll.lib;$(OutDir)\rust\target\debug\rust_stellar_core.lib;C:\Program Files\PostgreSQL\15\lib\libpq.lib;%(AdditionalDependencies) - (set CFLAGS=-MDd) & (set CXXFLAGS=-MDd) & cd $(MSBuildProjectDirectory)\..\..\src\rust\soroban\p21 & (set RUSTFLAGS=-Cmetadata=p21) & cargo build --package soroban-env-host --locked --target-dir $(OutDir)\rust\soroban-p21-target - (set CFLAGS=-MDd) & (set CXXFLAGS=-MDd) & cd $(MSBuildProjectDirectory)\..\..\src\rust\soroban\p22 & (set RUSTFLAGS=-Cmetadata=p22) & cargo build --package soroban-env-host --locked --features next --target-dir $(OutDir)\rust\soroban-p22-target - (set CFLAGS=-MDd) & (set CXXFLAGS=-MDd) & cd $(MSBuildProjectDirectory)\..\..\ & cargo rustc --package stellar-core --locked --features next --target-dir $(OutDir)\rust\target -- --extern soroban_env_host_p21=$(OutDir)\rust\soroban-p21-target\release\libsoroban_env_host.rlib --extern soroban_env_host_p22=$(OutDir)\rust\soroban-p22-target\release\libsoroban_env_host.rlib -L dependency=$(OutDir)\rust\soroban-p21-target\release\deps -L dependency=$(OutDir)\rust\soroban-p22-target\release\deps + $(MSBuildProjectDirectory)\build_rust.bat $(OutDir) debug next @@ -190,7 +188,7 @@ exit /b 0 Disabled true CEREAL_THREAD_SAFE;USE_POSTGRES;USE_SPDLOG;FMT_HEADER_ONLY=1;BUILD_TESTS;WIN32_LEAN_AND_MEAN;NOMINMAX;ASIO_STANDALONE;_WINSOCK_DEPRECATED_NO_WARNINGS;SODIUM_STATIC;ASIO_SEPARATE_COMPILATION;ASIO_ERROR_CATEGORY_NOEXCEPT=noexcept;_CRT_SECURE_NO_WARNINGS;_WIN32_WINNT=0x0601;WIN32;_MBCS;_CRT_NONSTDC_NO_DEPRECATE;YY_NO_UNISTD_H;%(PreprocessorDefinitions) - src;../../src;../../lib;../../lib/tracy/public/tracy;../../lib/spdlog/include;../../lib/libmedida/src;../../lib/soci/src/core;../../lib/autocheck/include;../../lib/cereal/include;../../lib/asio/asio/include;../../lib/xdrpp;../../lib/libsodium/src/libsodium/include;../../lib/fmt/include;../../lib/util;../..;src/$(Configuration)/generated;../../lib/sqlite;c:\Program Files\PostgreSQL\15\include;%(AdditionalIncludeDirectories) + src;../../src;../../lib;../../lib/tracy/public/tracy;../../lib/spdlog/include;../../lib/libmedida/src;../../lib/soci/src/core;../../lib/autocheck/include;../../lib/cereal/include;../../lib/asio/asio/include;../../lib/xdrpp;../../lib/libsodium/src/libsodium/include;../../lib/fmt/include;../../lib/util;../..;src/$(Configuration)/generated;src/generated;../../lib/sqlite;c:\Program Files\PostgreSQL\15\include;%(AdditionalIncludeDirectories) true false 4060;4100;4127;4324;4408;4510;4512;4582;4583;4592 @@ -205,13 +203,11 @@ exit /b 0 DebugFastLink - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;psapi.lib;Credui.lib;userenv.lib;bcrypt.lib;ntdll.lib;$(OutDir)\rust\target\release\rust_stellar_core.lib;C:\Program Files\PostgreSQL\15\lib\libpq.lib;%(AdditionalDependencies); + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;psapi.lib;Credui.lib;userenv.lib;bcrypt.lib;ntdll.lib;$(OutDir)\rust\target\debug\rust_stellar_core.lib;C:\Program Files\PostgreSQL\15\lib\libpq.lib;%(AdditionalDependencies); - (set CFLAGS=-MDd) & (set CXXFLAGS=-MDd) & cd $(MSBuildProjectDirectory)\..\..\src\rust\soroban\p21 & (set RUSTFLAGS=-Cmetadata=p21) & cargo build --package soroban-env-host --locked --target-dir $(OutDir)\rust\soroban-p21-target - (set CFLAGS=-MDd) & (set CXXFLAGS=-MDd) & cd $(MSBuildProjectDirectory)\..\..\src\rust\soroban\p22 & (set RUSTFLAGS=-Cmetadata=p22) & cargo build --package soroban-env-host --locked --target-dir $(OutDir)\rust\soroban-p22-target - (set CFLAGS=-MDd) & (set CXXFLAGS=-MDd) & cd $(MSBuildProjectDirectory)\..\..\ & cargo rustc --package stellar-core --locked --target-dir $(OutDir)\rust\target -- --extern soroban_env_host_p21=$(OutDir)\rust\soroban-p21-target\release\libsoroban_env_host.rlib --extern soroban_env_host_p22=$(OutDir)\rust\soroban-p22-target\release\libsoroban_env_host.rlib -L dependency=$(OutDir)\rust\soroban-p21-target\release\deps -L dependency=$(OutDir)\rust\soroban-p22-target\release\deps + $(MSBuildProjectDirectory)\build_rust.bat $(OutDir) debug curr @@ -256,7 +252,7 @@ exit /b 0 Disabled true CEREAL_THREAD_SAFE;ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION=1;USE_SPDLOG;FMT_HEADER_ONLY=1;BUILD_TESTS;WIN32_LEAN_AND_MEAN;NOMINMAX;ASIO_STANDALONE;_WINSOCK_DEPRECATED_NO_WARNINGS;SODIUM_STATIC;ASIO_SEPARATE_COMPILATION;ASIO_ERROR_CATEGORY_NOEXCEPT=noexcept;_CRT_SECURE_NO_WARNINGS;_WIN32_WINNT=0x0601;WIN32;_MBCS;_CRT_NONSTDC_NO_DEPRECATE;YY_NO_UNISTD_H;%(PreprocessorDefinitions) - src;../../src;../../lib;../../lib/tracy/public/tracy;../../lib/spdlog/include;../../lib/libmedida/src;../../lib/soci/src/core;../../lib/autocheck/include;../../lib/cereal/include;../../lib/asio/asio/include;../../lib/xdrpp;../../lib/libsodium/src/libsodium/include;../../lib/fmt/include;../../lib/util;../..;src/$(Configuration)/generated;../../lib/sqlite;c:\Program Files\PostgreSQL\15\include;%(AdditionalIncludeDirectories) + src;../../src;../../lib;../../lib/tracy/public/tracy;../../lib/spdlog/include;../../lib/libmedida/src;../../lib/soci/src/core;../../lib/autocheck/include;../../lib/cereal/include;../../lib/asio/asio/include;../../lib/xdrpp;../../lib/libsodium/src/libsodium/include;../../lib/fmt/include;../../lib/util;../..;src/$(Configuration)/generated;src/generated;../../lib/sqlite;c:\Program Files\PostgreSQL\15\include;%(AdditionalIncludeDirectories) true false 4060;4100;4127;4324;4408;4510;4512;4582;4583;4592 @@ -271,15 +267,13 @@ exit /b 0 DebugFastLink - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;psapi.lib;Credui.lib;userenv.lib;bcrypt.lib;ntdll.lib;$(OutDir)\rust\target\release\rust_stellar_core.lib + kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;psapi.lib;Credui.lib;userenv.lib;bcrypt.lib;ntdll.lib;$(OutDir)\rust\target\debug\rust_stellar_core.lib - (set CFLAGS=-MDd) & (set CXXFLAGS=-MDd) & cd $(MSBuildProjectDirectory)\..\..\src\rust\soroban\p21 & (set RUSTFLAGS=-Cmetadata=p21) & cargo build --package soroban-env-host --locked --target-dir $(OutDir)\rust\soroban-p21-target - (set CFLAGS=-MDd) & (set CXXFLAGS=-MDd) & cd $(MSBuildProjectDirectory)\..\..\src\rust\soroban\p22 & (set RUSTFLAGS=-Cmetadata=p22) & cargo build --package soroban-env-host --locked --features next --target-dir $(OutDir)\rust\soroban-p22-target - (set CFLAGS=-MDd) & (set CXXFLAGS=-MDd) & cd $(MSBuildProjectDirectory)\..\..\ & cargo rustc --package stellar-core --locked --features next --target-dir $(OutDir)\rust\target -- --extern soroban_env_host_p21=$(OutDir)\rust\soroban-p21-target\release\libsoroban_env_host.rlib --extern soroban_env_host_p22=$(OutDir)\rust\soroban-p22-target\release\libsoroban_env_host.rlib -L dependency=$(OutDir)\rust\soroban-p21-target\release\deps -L dependency=$(OutDir)\rust\soroban-p22-target\release\deps + $(MSBuildProjectDirectory)\build_rust.bat $(OutDir) debug next @@ -326,7 +320,7 @@ exit /b 0 true true CEREAL_THREAD_SAFE;USE_POSTGRES;ENABLE_NEXT_PROTOCOL_VERSION_UNSAFE_FOR_PRODUCTION=1;USE_SPDLOG;FMT_HEADER_ONLY=1;BUILD_TESTS;WIN32_LEAN_AND_MEAN;NOMINMAX;ASIO_STANDALONE;_WINSOCK_DEPRECATED_NO_WARNINGS;SODIUM_STATIC;ASIO_SEPARATE_COMPILATION;ASIO_ERROR_CATEGORY_NOEXCEPT=noexcept;TRACY_ENABLE;TRACY_ON_DEMAND;TRACY_NO_BROADCAST;TRACY_ONLY_LOCALHOST;TRACY_DELAYED_INIT;USE_TRACY;_CRT_SECURE_NO_WARNINGS;_WIN32_WINNT=0x0601;WIN32;_MBCS;_CRT_NONSTDC_NO_DEPRECATE;YY_NO_UNISTD_H;%(PreprocessorDefinitions) - src;../../src;../../lib;../../lib/tracy/public/tracy;../../lib/spdlog/include;../../lib/libmedida/src;../../lib/soci/src/core;../../lib/autocheck/include;../../lib/cereal/include;../../lib/asio/asio/include;../../lib/xdrpp;../../lib/libsodium/src/libsodium/include;../../lib/fmt/include;../../lib/util;../..;src/$(Configuration)/generated;../../lib/sqlite;c:\Program Files\PostgreSQL\15\include;%(AdditionalIncludeDirectories) + src;../../src;../../lib;../../lib/tracy/public/tracy;../../lib/spdlog/include;../../lib/libmedida/src;../../lib/soci/src/core;../../lib/autocheck/include;../../lib/cereal/include;../../lib/asio/asio/include;../../lib/xdrpp;../../lib/libsodium/src/libsodium/include;../../lib/fmt/include;../../lib/util;../..;src/$(Configuration)/generated;src/generated;../../lib/sqlite;c:\Program Files\PostgreSQL\15\include;%(AdditionalIncludeDirectories) false true 4060;4100;4127;4324;4408;4510;4512;4582;4583;4592 @@ -336,16 +330,14 @@ exit /b 0 false - true + DebugFastLink true true kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;psapi.lib;Credui.lib;userenv.lib;bcrypt.lib;ntdll.lib;$(OutDir)\rust\target\release\rust_stellar_core.lib;C:\Program Files\PostgreSQL\15\lib\libpq.lib;%(AdditionalDependencies); - cd $(MSBuildProjectDirectory)\..\..\src\rust\soroban\p21 & (set RUSTFLAGS=-Cmetadata=p21) & cargo build --release --package soroban-env-host --locked --target-dir $(OutDir)\rust\soroban-p21-target - cd $(MSBuildProjectDirectory)\..\..\src\rust\soroban\p22 & (set RUSTFLAGS=-Cmetadata=p22) & cargo build --release --package soroban-env-host --locked --features tracy --features next --target-dir $(OutDir)\rust\soroban-p22-target - cd $(MSBuildProjectDirectory)\..\..\ & cargo rustc --release --package stellar-core --locked --features tracy --features next --target-dir $(OutDir)\rust\target -- --extern soroban_env_host_p21=$(OutDir)\rust\soroban-p21-target\release\libsoroban_env_host.rlib --extern soroban_env_host_p22=$(OutDir)\rust\soroban-p22-target\release\libsoroban_env_host.rlib -L dependency=$(OutDir)\rust\soroban-p21-target\release\deps -L dependency=$(OutDir)\rust\soroban-p22-target\release\deps + $(MSBuildProjectDirectory)\build_rust.bat $(OutDir) release next @@ -391,7 +383,7 @@ exit /b 0 true true CEREAL_THREAD_SAFE;USE_POSTGRES;USE_SPDLOG;FMT_HEADER_ONLY=1;BUILD_TESTS;WIN32_LEAN_AND_MEAN;NOMINMAX;ASIO_STANDALONE;_WINSOCK_DEPRECATED_NO_WARNINGS;SODIUM_STATIC;ASIO_SEPARATE_COMPILATION;ASIO_ERROR_CATEGORY_NOEXCEPT=noexcept;TRACY_ENABLE;TRACY_ON_DEMAND;TRACY_NO_BROADCAST;TRACY_ONLY_LOCALHOST;TRACY_DELAYED_INIT;USE_TRACY;_CRT_SECURE_NO_WARNINGS;_WIN32_WINNT=0x0601;WIN32;_MBCS;_CRT_NONSTDC_NO_DEPRECATE;YY_NO_UNISTD_H;%(PreprocessorDefinitions) - src;../../src;../../lib;../../lib/tracy/public/tracy;../../lib/spdlog/include;../../lib/libmedida/src;../../lib/soci/src/core;../../lib/autocheck/include;../../lib/cereal/include;../../lib/asio/asio/include;../../lib/xdrpp;../../lib/libsodium/src/libsodium/include;../../lib/fmt/include;../../lib/util;../..;src/$(Configuration)/generated;../../lib/sqlite;c:\Program Files\PostgreSQL\15\include;%(AdditionalIncludeDirectories) + src;../../src;../../lib;../../lib/tracy/public/tracy;../../lib/spdlog/include;../../lib/libmedida/src;../../lib/soci/src/core;../../lib/autocheck/include;../../lib/cereal/include;../../lib/asio/asio/include;../../lib/xdrpp;../../lib/libsodium/src/libsodium/include;../../lib/fmt/include;../../lib/util;../..;src/$(Configuration)/generated;src/generated;../../lib/sqlite;c:\Program Files\PostgreSQL\15\include;%(AdditionalIncludeDirectories) false true 4060;4100;4127;4324;4408;4510;4512;4582;4583;4592 @@ -401,16 +393,14 @@ exit /b 0 false - true + DebugFastLink true true kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;psapi.lib;Credui.lib;userenv.lib;bcrypt.lib;ntdll.lib;$(OutDir)\rust\target\release\rust_stellar_core.lib;C:\Program Files\PostgreSQL\15\lib\libpq.lib;%(AdditionalDependencies); - cd $(MSBuildProjectDirectory)\..\..\src\rust\soroban\p21 & (set RUSTFLAGS=-Cmetadata=p21) & cargo build --release --package soroban-env-host --locked --target-dir $(OutDir)\rust\soroban-p21-target - cd $(MSBuildProjectDirectory)\..\..\src\rust\soroban\p22 & (set RUSTFLAGS=-Cmetadata=p22) & cargo build --release --package soroban-env-host --locked --features tracy --target-dir $(OutDir)\rust\soroban-p22-target - cd $(MSBuildProjectDirectory)\..\..\ & cargo rustc --release --package stellar-core --locked --features tracy --target-dir $(OutDir)\rust\target -- --extern soroban_env_host_p21=$(OutDir)\rust\soroban-p21-target\release\libsoroban_env_host.rlib --extern soroban_env_host_p22=$(OutDir)\rust\soroban-p22-target\release\libsoroban_env_host.rlib -L dependency=$(OutDir)\rust\soroban-p21-target\release\deps -L dependency=$(OutDir)\rust\soroban-p22-target\release\deps + $(MSBuildProjectDirectory)\build_rust.bat $(OutDir) release curr @@ -451,32 +441,16 @@ exit /b 0 - $(IntDir)\httpthreaded\ - $(IntDir)\httpthreaded\ - $(IntDir)\httpthreaded\ - $(IntDir)\httpthreaded\ - $(IntDir)\httpthreaded\ + $(IntDir)\httpthreaded\ - $(IntDir)\httpthreaded\ - $(IntDir)\httpthreaded\ - $(IntDir)\httpthreaded\ - $(IntDir)\httpthreaded\ - $(IntDir)\httpthreaded\ + $(IntDir)\httpthreaded\ - $(IntDir)\httpthreaded\ - $(IntDir)\httpthreaded\ - $(IntDir)\httpthreaded\ - $(IntDir)\httpthreaded\ - $(IntDir)\httpthreaded\ + $(IntDir)\httpthreaded\ - $(IntDir)\httpthreaded\ - $(IntDir)\httpthreaded\ - $(IntDir)\httpthreaded\ - $(IntDir)\httpthreaded\ - $(IntDir)\httpthreaded\ + $(IntDir)\httpthreaded\ @@ -922,7 +896,7 @@ exit /b 0 - + @@ -1266,7 +1240,7 @@ exit /b 0 - + @@ -1311,37 +1285,15 @@ exit /b 0 - false Document - false - false - false - false + src/$(Configuration)/generated/xdr/XDRFilesSha256.cpp + None + running hash-xdrs.sh wsl bash ../../hash-xdrs.sh ../../src/protocol-curr > src/$(Configuration)/generated/xdr/XDRFilesSha256.cpp - running hash-xdrs.sh - src/$(Configuration)/generated/xdr/XDRFilesSha256.cpp - src/$(Configuration)/generated/xdr/Stellar-overlay.h;src/$(Configuration)/generated/xdr/Stellar-transaction.h;src/$(Configuration)/generated/xdr/Stellar-ledger.h;src/$(Configuration)/generated/xdr/Stellar-ledger-entries.h;src/$(Configuration)/generated/xdr/Stellar-SCP.h;src/$(Configuration)/generated/xdr/Stellar-types.h;src/$(Configuration)/generated/xdr/Stellar-contract-config-setting.h - None wsl bash ../../hash-xdrs.sh ../../src/protocol-next > src/$(Configuration)/generated/xdr/XDRFilesSha256.cpp - running hash-xdrs.sh - src/$(Configuration)/generated/xdr/XDRFilesSha256.cpp - src/$(Configuration)/generated/xdr/Stellar-overlay.h;src/$(Configuration)/generated/xdr/Stellar-transaction.h;src/$(Configuration)/generated/xdr/Stellar-ledger.h;src/$(Configuration)/generated/xdr/Stellar-ledger-entries.h;src/$(Configuration)/generated/xdr/Stellar-SCP.h;src/$(Configuration)/generated/xdr/Stellar-types.h;src/$(Configuration)/generated/xdr/Stellar-contract-config-setting.h - None wsl bash ../../hash-xdrs.sh ../../src/protocol-curr > src/$(Configuration)/generated/xdr/XDRFilesSha256.cpp - running hash-xdrs.sh - src/$(Configuration)/generated/xdr/XDRFilesSha256.cpp - src/$(Configuration)/generated/xdr/Stellar-overlay.h;src/$(Configuration)/generated/xdr/Stellar-transaction.h;src/$(Configuration)/generated/xdr/Stellar-ledger.h;src/$(Configuration)/generated/xdr/Stellar-ledger-entries.h;src/$(Configuration)/generated/xdr/Stellar-SCP.h;src/$(Configuration)/generated/xdr/Stellar-types.h - None wsl bash ../../hash-xdrs.sh ../../src/protocol-next > src/$(Configuration)/generated/xdr/XDRFilesSha256.cpp - running hash-xdrs.sh - src/$(Configuration)/generated/xdr/XDRFilesSha256.cpp - src/$(Configuration)/generated/xdr/Stellar-overlay.h;src/$(Configuration)/generated/xdr/Stellar-transaction.h;src/$(Configuration)/generated/xdr/Stellar-ledger.h;src/$(Configuration)/generated/xdr/Stellar-ledger-entries.h;src/$(Configuration)/generated/xdr/Stellar-SCP.h;src/$(Configuration)/generated/xdr/Stellar-types.h - None wsl bash ../../hash-xdrs.sh ../../src/protocol-next > src/$(Configuration)/generated/xdr/XDRFilesSha256.cpp - running hash-xdrs.sh - src/$(Configuration)/generated/xdr/XDRFilesSha256.cpp - src/$(Configuration)/generated/xdr/Stellar-overlay.h;src/$(Configuration)/generated/xdr/Stellar-transaction.h;src/$(Configuration)/generated/xdr/Stellar-ledger.h;src/$(Configuration)/generated/xdr/Stellar-ledger-entries.h;src/$(Configuration)/generated/xdr/Stellar-SCP.h;src/$(Configuration)/generated/xdr/Stellar-types.h;src/$(Configuration)/generated/xdr/Stellar-contract-config-setting.h - None @@ -1655,19 +1607,17 @@ exit /b 0 Document - $(OutDir)\bin\cxxbridge.exe ..\..\src\rust\src\lib.rs --cfg test=false --header --output src\$(Configuration)\generated\rust\RustBridge.h -$(OutDir)\bin\cxxbridge.exe ..\..\src\rust\src\lib.rs --cfg test=false --output src\$(Configuration)\generated\rust\RustBridge.cpp + $(MSBuildProjectDirectory)\generate_rust_bridge.bat $(OutDir)\..\bin\cxxbridge.exe + $(OutDir)\..\bin\cxxbridge.exe;src/$(Configuration)/generated/xdr/Stellar-ledger-entries.h;src/$(Configuration)/generated/xdr/Stellar-transaction.h;src/$(Configuration)/generated/xdr/Stellar-ledger.h;src/$(Configuration)/generated/xdr/Stellar-internal.h;src/$(Configuration)/generated/xdr/Stellar-contract-config-setting.h;src/$(Configuration)/generated/xdr/Stellar-types.h;src/$(Configuration)/generated/xdr/Stellar-contract.h;src/$(Configuration)/generated/xdr/Stellar-overlay.h;src/$(Configuration)/generated/xdr/Stellar-SCP.h running cxxbridge to generate RustBridge.h and RustBridge.cpp - src\$(Configuration)\generated\rust\RustBridge.h;src\$(Configuration)\generated\rust\RustBridge.cpp + src\generated\rust\RustBridge.h;src\generated\rust\RustBridge.cpp ClInclude - $(OutDir)\bin\cxxbridge.exe - $(OutDir)\bin\cxxbridge.exe;$(OutDir)\rust\target\release\rust_stellar_core.lib Document - cargo install --root $(OutDir) cxxbridge-cmd --version 1.0.68 - cargo install --root $(OutDir) cxxbridge-cmd --version 1.0.68 - $(OutDir)/bin/cxxbridge.exe + cargo install --root $(OutDir)\.. cxxbridge-cmd --version 1.0.68 + cargo install --root $(OutDir)\.. cxxbridge-cmd --version 1.0.68 + $(OutDir)\..\bin\cxxbridge.exe diff --git a/Builds/VisualStudio/stellar-core.vcxproj.filters b/Builds/VisualStudio/stellar-core.vcxproj.filters index 7eb9e62f0e..f5d7dbecb6 100644 --- a/Builds/VisualStudio/stellar-core.vcxproj.filters +++ b/Builds/VisualStudio/stellar-core.vcxproj.filters @@ -537,7 +537,7 @@ util - + rust\generated @@ -923,7 +923,7 @@ ledger - + ledger @@ -1721,7 +1721,7 @@ util - + rust\generated