# What Programming Languages Are Used in GeoLibre? Full Stack Breakdown

> Discover the programming languages powering GeoLibre: TypeScript, Python, and Rust. Explore how this polyglot monorepo enables cross-platform geospatial analytics.

- Repository: [Open Geospatial Solutions/GeoLibre](https://github.com/opengeos/GeoLibre)
- Tags: full-stack-breakdown
- Published: 2026-08-16

---

**GeoLibre is built with TypeScript, Python, and Rust—a polyglot monorepo design that enables cross-platform geospatial analytics in the browser, desktop, and Jupyter notebooks.**

GeoLibre, an open-source geospatial visualization toolkit by **opengeos/GeoLibre**, combines multiple programming languages to balance performance, portability, and developer experience. This architecture lets heavy processing run locally while maintaining a responsive web-native interface. Understanding what programming languages are used in GeoLibre reveals how the project achieves its "run everywhere" philosophy.

## TypeScript: Frontend, Workers, and Build System

**TypeScript** powers the entire user-facing layer of GeoLibre. The project uses React with Vite for bundling and Zustand for state management. All UI components, desktop interfaces (via Tauri web-view), and Jupyter embeddings share this TypeScript foundation.

The monorepo structure is defined in [`package.json`](https://github.com/opengeos/GeoLibre/blob/main/package.json) at the repository root, which configures workspaces and build scripts across multiple applications. The desktop entry point lives at [`apps/geolibre-desktop/src/main.tsx`](https://github.com/opengeos/GeoLibre/blob/main/apps/geolibre-desktop/src/main.tsx), where the React application mounts inside the Tauri shell.

Background processing in the browser uses **Web Workers** written in TypeScript. The [`workers/viewer/tsconfig.json`](https://github.com/opengeos/GeoLibre/blob/main/workers/viewer/tsconfig.json) path confirms that map viewer logic, AI proxies, collaboration features, and tile management all execute in separate threads without blocking the main UI.

```typescript
// TypeScript UI: Adding a vector layer from GeoJSON
import { useStore } from '@geolibre/core';
import { addGeoJsonLayer } from '@geolibre/processing';

function loadSampleGeoJson() {
  fetch('/samples/roads.geojson')
    .then(r => r.json())
    .then(geojson => {
      const store = useStore.getState();
      // Single source of truth for all layers via Zustand store
      store.dispatch(addGeoJsonLayer(geojson, { name: 'Sample Roads' }));
    });
}

```

*Source:* UI components in [`apps/geolibre-desktop/src/components/selection/SelectByLocationDialog.tsx`](https://github.com/opengeos/GeoLibre/blob/main/apps/geolibre-desktop/src/components/selection/SelectByLocationDialog.tsx)

## Python: Backend Processing and ML Endpoints

**Python** handles data-intensive geospatial operations through a **FastAPI** sidecar server. This layer executes vector and raster processing with GeoPandas, Rasterio, and Apache Sedona. The Python server runs locally on `127.0.0.1:8765`, with the TypeScript frontend proxying requests for privacy-preserving computation.

Core project logic resides in [`python/src/geolibre/project.py`](https://github.com/opengeos/GeoLibre/blob/main/python/src/geolibre/project.py). The server entry point at [`python/src/geolibre/_server.py`](https://github.com/opengeos/GeoLibre/blob/main/python/src/geolibre/_server.py) initializes the Uvicorn ASGI server, keeping all heavy lifting on the user's machine rather than remote servers.

```python

# Python sidecar: Starting the FastAPI server

# python/src/geolibre/_server.py

import uvicorn
from geolibre_server.app.main import app

if __name__ == "__main__":
    # localhost-only binding; desktop/web UI proxies to this URL

    uvicorn.run(app, host="127.0.0.1", port=8765)

```

This Python layer also exposes optional **machine learning endpoints**, enabling local inference on geospatial data without cloud dependencies.

## Rust: Native Desktop Runtime and WebAssembly

**Rust** serves two critical roles in GeoLibre's architecture: native desktop integration and WebAssembly compilation.

### Tauri Desktop Wrapper

The Tauri-based desktop application uses Rust for all native OS interactions. The main runtime entry point at [`apps/geolibre-desktop/src-tauri/src/main.rs`](https://github.com/opengeos/GeoLibre/blob/main/apps/geolibre-desktop/src-tauri/src/main.rs) builds the native bundle, while [`lib.rs`](https://github.com/opengeos/GeoLibre/blob/main/lib.rs) in the same directory exposes commands for file system access, native DuckDB integration, and platform dialogs.

```rust
// Rust native command: File dialog via Tauri
// apps/geolibre-desktop/src-tauri/src/lib.rs
#[tauri::command]
async fn open_file_dialog() -> Result<String, String> {
    tauri::api::dialog::FileDialogBuilder::new()
        .pick_file()
        .map(|path| path.to_string_lossy().into_owned())
        .ok_or_else(|| "No file selected".into())
}

```

### WebAssembly Compilation

Rust also compiles to **WebAssembly (WASM)** through the `geolibre-wasm` package. This brings geospatial algorithms—Whitebox tools, vector-to-PMTiles conversion, and other compute-intensive operations—directly into the browser without requiring the Python sidecar.

## CSS/Tailwind and HTML: Styling and Structure

**CSS** (generated via Tailwind) and **HTML** complete the stack. These handle UI layout, theming, and the embedded Jupyter web interface. While not "programming languages" in the strict sense, they are first-class citizens in the GeoLibre codebase with dedicated source files and build processes.

## Language Selection Rationale

| Language | Primary Use | Key File |
|----------|-------------|----------|
| **TypeScript** | React UI, state management, Web Workers | [`apps/geolibre-desktop/src/main.tsx`](https://github.com/opengeos/GeoLibre/blob/main/apps/geolibre-desktop/src/main.tsx) |
| **Python** | Geoprocessing, FastAPI server, ML | [`python/src/geolibre/project.py`](https://github.com/opengeos/GeoLibre/blob/main/python/src/geolibre/project.py) |
| **Rust** | Native desktop (Tauri), WebAssembly | [`apps/geolibre-desktop/src-tauri/src/main.rs`](https://github.com/opengeos/GeoLibre/blob/main/apps/geolibre-desktop/src-tauri/src/main.rs) |
| **CSS/Tailwind** | Styling, theming | Various `.css` and config files |

This polyglot approach is deliberate: **TypeScript** maximizes code reuse across platforms, **Python** leverages the geospatial ecosystem's mature libraries, and **Rust** delivers native performance with memory safety. The result is a single codebase that runs as a web app, native desktop application, and Jupyter extension.

## Summary

- **TypeScript** dominates the frontend: React components, state management (Zustand), build tooling (Vite), and background Web Workers.

- **Python** runs the processing sidecar: FastAPI server with GeoPandas, Rasterio, and optional ML endpoints, binding to `localhost:8765`.

- **Rust** powers native desktop features through Tauri and compiles performance-critical algorithms to WebAssembly for browser execution.

- **CSS/Tailwind + HTML** handle all presentation layer concerns across platforms.

- What programming languages are used in GeoLibre reflects a pragmatic architecture: use the best tool for each layer while maintaining tight integration between them.

## Frequently Asked Questions

### Is GeoLibre primarily a TypeScript or Python project?

GeoLibre is genuinely polyglot, with **TypeScript** as the largest codebase by file count and **Python** handling the most computationally intensive operations. The TypeScript layer provides the unified interface, while Python executes when heavy geoprocessing is required.

### Why does GeoLibre use Rust instead of Electron for the desktop app?

Rust via **Tauri** produces smaller bundle sizes, lower memory consumption, and native OS integration without shipping a full Chromium runtime. The [`apps/geolibre-desktop/src-tauri/src/main.rs`](https://github.com/opengeos/GeoLibre/blob/main/apps/geolibre-desktop/src-tauri/src/main.rs) implementation demonstrates this lean approach compared to Electron's heavier architecture.

### Can GeoLibre run without Python installed?

Partially. The TypeScript frontend and Rust/WebAssembly components function independently for visualization and basic operations. However, **vector/raster processing and ML features require the Python sidecar** running locally, as implemented in [`python/src/geolibre/_server.py`](https://github.com/opengeos/GeoLibre/blob/main/python/src/geolibre/_server.py).

### What WebAssembly functionality does GeoLibre include?

The `geolibre-wasm` package compiles Rust algorithms to WASM for in-browser execution, including Whitebox geospatial tools and vector-to-PMTiles conversion. This avoids Python dependency for specific high-performance operations.