petern48 commented on code in PR #271:
URL: https://github.com/apache/sedona-db/pull/271#discussion_r2485071755


##########
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:
   ```suggestion
      ```json
   ```
   
   I didn't quite understand changing the JSON code block to this bash one with 
this new `settings.json: |` line. I'm used to just adding json code directly to 
the `settings.json` file. Is there a reason for this change? If not, shall we 
change it back to a simple json block?



##########
docs/contributors-guide.md:
##########
@@ -71,6 +71,15 @@ Your first step is to create a personal copy of the 
repository and connect it to
 
 SedonaDB is written in Rust and is a standard `cargo` workspace.
 
+Before running cargo test, make sure to set the CMake toolchain variable:
+
+```export 
CMAKE_TOOLCHAIN_FILE=/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake```
+
+Replace `/path/to/vcpkg/` with the actual path to your vcpkg installation.

Review Comment:
   It looks like we're adding system-specific instructions to the Rust section. 
I think a cleaner way to make it clear that these need to be run before `cargo 
test` is to instead move the existing "Rust" section down the page after the 
**System dependencies** section. And then modify the existing **System 
dependencies** with your proposed changes.
   
   Right now, the PR looks like this:
   
   ```
   - Rust (modified)
   - System Dependencies
     - MacOS
     - Windows / Linux (modified)
   - Python
   ```
   
   I'm proposing to change it to this
   
   ```
   - System Dependencies
     - MacOS
     - Windows (modified)
     - Linux  (modified)
   - Rust
   - Python
   ```
   
   WDYT, as a new contributor? (genuine question) Would this still smoothen the 
env setup experience, as your original proposal? I like this idea because it 1) 
removes some redundancy and 2) avoids specifying Windows/Linux-specific 
instructions outside of the corresponding Windows/Linux sections.



-- 
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]

Reply via email to