All projects

Developer Tool / Library

ROUTION

A lightweight, runtime-independent route resolution engine available across multiple programming languages. Compiles route definitions into a reusable matcher that resolves pathnames to structured results.

  • TypeScript
  • JavaScript
  • Go
  • Python
  • PHP
  • Rust
ROUTION interface
ROUTION — route resolution engine with identical behavior across languages.

Overview

Route resolution without the framework overhead.

ROUTION does one thing: resolve incoming pathnames against compiled route definitions and return matching results. It is not a router, not a framework, and has zero runtime dependencies.

The engine provides identical behavior across multiple programming languages, making it ideal for polyglot environments.

The problem

Route matching solutions are often tied to specific runtimes or frameworks.

Many applications need route matching without adopting a complete routing framework. Existing solutions are often tied to specific runtimes or frameworks.

  • Route matching libraries are framework-specific and not portable.
  • Polyglot environments need consistent behavior across languages.
  • Developers need route resolution without middleware, rendering, or other extras.

Approach

Single-responsibility engine with identical behavior across languages.

Designed a single-responsibility engine with identical behavior across languages. Supports static routes, dynamic parameters, wildcard fallbacks, query parsing, and automatic pathname normalization.

The approach focuses on doing route resolution correctly and consistently, nothing more.

Solution

Self-contained implementations with compile-once-match-many design.

Built implementations in JavaScript (reference), Go, Python, PHP, and planned Rust/Dart. Each is self-contained with no cross-dependencies. Supports regex and trie matching strategies.

The compile-once-match-many design ensures optimal performance for repeated route resolution.

ROUTION architecture diagram
Compile-once-match-many design with automatic strategy selection.

Implementation

Technical implementation.

Each language implementation follows the same design principles while leveraging idiomatic patterns of its host language.

JavaScript

TypeScript/JavaScript (ESM) reference implementation with trie and regex strategies.

Other Languages

Go module, Python package, PHP module with identical matching behavior.

Features

Compile-once-match-many, query string parsing, normalized path handling.

Results

What changed.

The multi-language approach provides consistent route resolution across diverse tech stacks.

5language implementations with identical behavior
0runtime dependencies per implementation
Usedas route resolution layer in History++

Links

Let's work together

Have a problem worth solving?

Let's talk about your project, technical challenge, or next idea.

Get in touch