@@ -73,26 +73,59 @@ The project uses GitHub Actions for continuous integration and deployment. The w
7373
7474## System Requirements
7575
76- ### For Rendering (Smoke/Integration Tests )
76+ ### Build-Time Dependencies (for compiling the Rust binary )
7777
78- The native renderer requires :
78+ Required when building the native renderer from source :
7979
80- 1 . ** libcurl4-openssl-dev** : For HTTP tile requests
81- 2 . ** pkg-config** : For build configuration
82- 3 . ** libglfw3-dev** : GLFW library for windowing
83- 4 . ** libuv1-dev** : libuv for async I/O
84- 5 . ** libz-dev** : zlib compression library
85- 6 . ** Network access** : Must reach tiles.openfreemap.org
80+ | Package | Purpose |
81+ | ---------| ---------|
82+ | ** Rust 1.70+** | Compiler toolchain |
83+ | ** libcurl4-openssl-dev** | HTTP client library (development headers) |
84+ | ** pkg-config** | Build configuration tool |
85+ | ** libglfw3-dev** | GLFW windowing library (development headers) |
86+ | ** libuv1-dev** | Async I/O library (development headers) |
87+ | ** libz-dev** | zlib compression (development headers) |
88+ | ** CMake** | Build system generator |
8689
87- ### For Building
90+ ** Ubuntu/Debian:**
91+ ``` bash
92+ sudo apt-get install -y \
93+ libcurl4-openssl-dev \
94+ pkg-config \
95+ libglfw3-dev \
96+ libuv1-dev \
97+ libz-dev \
98+ cmake
99+ ```
100+
101+ ### Runtime Dependencies (for using pre-built wheels)
102+
103+ Required when using mlnative from PyPI (pre-built wheels):
104+
105+ | Package | Purpose | Critical |
106+ | ---------| ---------| ----------|
107+ | ** mesa-vulkan-drivers** | Vulkan graphics drivers | ** YES** |
108+ | ** libcurl4** | HTTP client library | Yes |
109+ | ** libglfw3** | GLFW windowing library | Yes |
110+ | ** libuv1** | Async I/O library | Yes |
111+ | ** zlib1g** | zlib compression | Yes |
112+ | ** Network access** | Must reach tiles.openfreemap.org | Yes |
113+
114+ ** ⚠️ CRITICAL:** ` mesa-vulkan-drivers ` is required for GPU rendering. Without it, the renderer will crash immediately.
88115
89- 1 . ** Rust 1.70+** : For compiling the native renderer
90- 2 . ** libcurl4-openssl-dev** : System dependency
91- 3 . ** pkg-config** : Build configuration
92- 4 . ** libglfw3-dev** : GLFW library
93- 5 . ** libuv1-dev** : libuv for async I/O
94- 6 . ** libz-dev** : zlib compression
95- 7 . ** CMake** : Required by maplibre-native build
116+ ** Ubuntu/Debian:**
117+ ``` bash
118+ sudo apt-get install -y \
119+ mesa-vulkan-drivers \
120+ libcurl4 \
121+ libglfw3 \
122+ libuv1 \
123+ zlib1g
124+ ```
125+
126+ ** Why different packages?**
127+ - Build uses ` -dev ` packages (headers + libraries)
128+ - Runtime uses base packages (libraries only, smaller/faster)
96129
97130## Network Requirements
98131
@@ -111,41 +144,69 @@ Error: `cannot find -lcurl`
111144Solution: Install ` libcurl4-openssl-dev `
112145
113146### Graphics/Display Issues
114- Error: ` Failed to initialize graphics `
115- Solution: Ensure all graphics libraries are installed (` libglfw3-dev ` , ` libuv1-dev ` )
147+ Error: ` Failed to initialize graphics ` or ` Renderer process closed unexpectedly `
148+ Solution: Install ** mesa-vulkan-drivers** (critical runtime dependency):
149+ ``` bash
150+ sudo apt-get install -y mesa-vulkan-drivers
151+ ```
152+
153+ ### Missing System Libraries
154+ Error: ` cannot find -lcurl ` (during build)
155+ Solution: Install development package:
156+ ``` bash
157+ sudo apt-get install -y libcurl4-openssl-dev
158+ ```
116159
117160### Network Timeouts
118161Error: ` Failed to fetch tile `
119162Solution: Ensure outbound HTTPS is allowed and OpenFreeMap is accessible
120163
121164## Testing Locally
122165
123- To run the same tests as CI:
166+ ### Option 1: Using Pre-built Wheel (Recommended for testing)
167+
168+ If you just want to test rendering without building:
124169
125170``` bash
126- # Install system dependencies (Ubuntu/Debian)
171+ # Install runtime dependencies only
127172sudo apt-get install -y \
128- libcurl4-openssl-dev \
129- pkg-config \
130- libglfw3-dev \
131- libuv1-dev \
132- libz-dev
173+ mesa-vulkan-drivers \
174+ libcurl4 \
175+ libglfw3 \
176+ libuv1 \
177+ zlib1g
133178
134- # Build the binary
135- just build-rust
179+ # Install mlnative from PyPI
180+ pip install mlnative
136181
137- # Run unit tests
138- just test-unit
139-
140- # Run smoke test
182+ # Run tests
141183python -c "
142184from mlnative import Map
143185with Map(256, 256) as m:
144186 png = m.render(center=[0, 0], zoom=1)
145187 print(f'Rendered: {len(png)} bytes')
146188"
189+ ```
190+
191+ ### Option 2: Building from Source
192+
193+ If you need to modify and build the Rust binary:
147194
148- # Run integration tests
195+ ``` bash
196+ # Install build dependencies
197+ sudo apt-get install -y \
198+ libcurl4-openssl-dev \
199+ pkg-config \
200+ libglfw3-dev \
201+ libuv1-dev \
202+ libz-dev \
203+ cmake
204+
205+ # Build the binary
206+ just build-rust
207+
208+ # Run tests
209+ just test-unit
149210pytest tests/ -m integration -v
150211```
151212
0 commit comments