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


##########
docs/contributors-guide.md:
##########
@@ -66,76 +66,127 @@ Your first step is to create a personal copy of the 
repository and connect it to
         upstream  https://github.com/apache/sedona-db.git (fetch)
         upstream  https://github.com/apache/sedona-db.git (push)
         ```
+## System dependencies
 
-## Rust
+Some crates in the workspace wrap native libraries and require system 
dependencies (GEOS, PROJ, Abseil, OpenSSL, CMake, etc.). We recommend using:
 
-SedonaDB is written in Rust and is a standard `cargo` workspace.
+### macOS: Homebrew
+``` bash brew install abseil openssl cmake geos proj ```
 
-You can install a recent version of the Rust compiler and cargo from
-[rustup.rs](https://rustup.rs/) and run tests using `cargo test`.
+Ensure Homebrew-installed tools are on your PATH (Homebrew usually does this 
automatically).
 
-A local development version of the CLI can be run with `cargo run --bin 
sedona-cli`.
+### Windows
 
-### Test data setup
+Suggested workflow (PowerShell):
 
-Some tests require submodules that contain test data or pinned versions of
-external dependencies. These submodules can be initialized with:
+First, install Rust if it is not already installed:
 
-```shell
-git submodule init
-git submodule update --recursive
+```powershell
+Invoke-WebRequest https://sh.rustup.rs -UseBasicParsing -OutFile 
rustup-init.exe
+.\rustup-init.exe
+# Restart PowerShell
+rustc --version
+cargo --version
 ```
 
-Additionally, some of the data required in the tests can be downloaded by 
running the following script.
+Next, install Visual Studio Build Tools 
(<https://visualstudio.microsoft.com/downloads/>). Pick "Desktop development 
with C++" during install.
 
-```bash
-python submodules/download-assets.py
+Next, install CMake (<https://cmake.org/>). Ensure "Add CMake to system PATH" 
is selected during installation.
+
+```powershell
+cmake --version
 ```
 
-### System dependencies
 
-Some crates wrap external native libraries and require system dependencies
-to build.
+Now, install and bootstrap vcpkg (example path: C:\dev\vcpkg — you can choose 
a different path; see note below about short paths):
 
-!!!note "`sedona-s2geography`"
-    At this time, the only crate that requires this is the `sedona-s2geography`
-    crate, which requires [CMake](https://cmake.org),
-    [Abseil](https://github.com/abseil/abseil-cpp) and OpenSSL.
+```powershell
+git clone https://github.com/microsoft/vcpkg.git C:\dev\vcpkg
+cd C:\dev\vcpkg
+.\bootstrap-vcpkg.bat
+```
 
-#### macOS
 
-These can be installed on macOS with [Homebrew](https://brew.sh):
+Next, install the required libraries with vcpkg:
 
-```shell
-brew install abseil openssl cmake geos
+```powershell
+C:\dev\vcpkg\vcpkg.exe install geos proj abseil openssl
 ```
 
-#### Linux and Windows
+Configure environment variables (PowerShell example — update paths as needed):
 
-On Linux and Windows, it is recommended to use 
[vcpkg](https://github.com/microsoft/vcpkg)
-to provide external dependencies. This can be done by setting the 
`CMAKE_TOOLCHAIN_FILE`
-environment variable:
+```powershell
+$env:VCPKG_ROOT = 'C:\dev\vcpkg'
+$env:CMAKE_TOOLCHAIN_FILE = 
"${env:VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
 
-```shell
-export CMAKE_TOOLCHAIN_FILE=/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake
+# pkg-config/ msys path (hash may vary)
+$env:PATH = 
"${env:VCPKG_ROOT}/downloads/tools/msys2/<msys-hash>/mingw64/bin/;$env:PATH"
+$env:PKG_CONFIG_SYSROOT_DIR = 
"${env:VCPKG_ROOT}/downloads/tools/msys2/<msys-hash>/mingw64/"
+$env:PKG_CONFIG_PATH = 
"${env:VCPKG_ROOT}/installed/x64-windows-dynamic-release/lib/pkgconfig/"
 ```
 
-#### Visual Studio Code (VSCode) Configuration
 
-When using VSCode, it may be necessary to set this environment variable in 
`settings.json`
-such that it can be found by rust-analyzer when running build/run tasks:
+Note: the downloads/tools/msys2/<msys-hash> folder name varies per vcpkg 
bootstrap. Replace <msys-hash> with the actual folder name on your system.
+
+VS Code integration (so rust-analyzer sees the toolchain):
+
+Add to your ```settings.json```:
 
 ```json
 {
-    "rust-analyzer.runnables.extraEnv": {
-        "CMAKE_TOOLCHAIN_FILE": 
"/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake"
-    },
-    "rust-analyzer.cargo.extraEnv": {
-        "CMAKE_TOOLCHAIN_FILE": 
"/path/to/vcpkg/scripts/buildsystems/vcpkg.cmake"
-    }
+  "rust-analyzer.runnables.extraEnv": {
+    "CMAKE_TOOLCHAIN_FILE": "C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake"
+  },
+  "rust-analyzer.cargo.extraEnv": {
+    "CMAKE_TOOLCHAIN_FILE": "C:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake"
+  }
 }
 ```
 
+### Linux
+
+Linux users may install system dependencies from a system package manager. 
Note that recent versions are required because the Abseil version required is 
relatively recent compared to the package version on some common LTS platforms.
+
+Ubuntu/Debian (Ubuntu 24.04 LTS is too old; however, later versions have the 
required version of Abseil)
+
+```shell
+sudo apt-get install -y build-essential cmake libssl-dev libproj-dev 
libgeos-dev python3-dev libabsl-dev
+

Review Comment:
   Great catch 😬 . I need to remember to check preview mode.
   
   <img width="899" height="287" alt="Image" 
src="https://github.com/user-attachments/assets/315e039c-abd5-4d51-ab3c-6f79e0476a55";
 />



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