LakshmiSowmya04 commented on code in PR #271: URL: https://github.com/apache/sedona-db/pull/271#discussion_r2485236116
########## docs/contributors-guide.md: ########## @@ -116,25 +125,73 @@ On Linux and Windows, it is recommended to use [vcpkg](https://github.com/micros to provide external dependencies. This can be done by setting the `CMAKE_TOOLCHAIN_FILE` environment variable: -```shell -export CMAKE_TOOLCHAIN_FILE=/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake -``` - -#### Visual Studio Code (VSCode) Configuration +#### Windows + +1. Install Rust + +Install the latest Rust toolchain from [rustup.rs](https://rustup.rs): + +**powershell** +`` +Invoke-WebRequest https://sh.rustup.rs -UseBasicParsing -OutFile rustup-init.exe +.\rustup-init.exe `` +Restart PowerShell, then verify installation: + +`` +rustc --version +cargo --version +`` + +2. Download and install Visual Studio Build Tools. + During installation, select the workload "Desktop development with C++". + link: https://visualstudio.microsoft.com/downloads/ + +3. Install CMake: + Download and install CMake, ensuring "Add CMake to system PATH" is selected. + link: https://cmake.org/download/ + `` cmake --version`` +4. Install and Bootstrap vcpkg: + Clone the vcpkg repository and build the vcpkg executable. + `` + git clone https://github.com/microsoft/vcpkg.git C:\dev\vcpkg + cd C:\dev\vcpkg + .\bootstrap-vcpkg.bat + `` + +5. Install Required Libraries: + Install necessary dependencies for SedonaDB using vcpkg. + ``C:\dev\vcpkg\vcpkg.exe" install geos proj abseil openssl`` + +6. Configure Environment Variables: + Set environment variables so Cargo and CMake can find the installed dependencies. + The MSYS2 hash folder inside downloads/tools/msys2 may vary—update it as needed. + ```bash + # vcpkg root and toolchain + $env:VCPKG_ROOT = 'C:\dev\vcpkg' + $env:CMAKE_TOOLCHAIN_FILE = "${env:VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" + + # pkg-config setup (path hash may vary) + $env:PATH = "${env:VCPKG_ROOT}/downloads/tools/msys2/21caed2f81ec917b/mingw64/bin/;$env:PATH" + $env:PKG_CONFIG_SYSROOT_DIR = "${env:VCPKG_ROOT}/downloads/tools/msys2/21caed2f81ec917b/mingw64/" + $env:PKG_CONFIG_PATH = "${env:VCPKG_ROOT}/installed/x64-windows-dynamic-release/lib/pkgconfig/" + ``` + note: > + The hash (21caed2f81ec917b) inside downloads/tools/msys2/ may differ on your system. + +7. Visual Studio Code Configuration: + When using VSCode, set the CMAKE_TOOLCHAIN_FILE variable in settings.json so rust-analyzer can detect it. + ```bash + settings.json: | Review Comment: I actually wanted it to appear as a code block, so I used bash. This is the settings.json I used when installing directly on Windows via settings.js. I’ll change it back. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
