WAHGEX - Compiled regular expressions

WHAT

WAHGEX is a regular expression engine that compiles the regex into a WebAssembly (WASM) module instead of executing it directly. The output WASM module can be passed to a variety of engines, such as the Web platform, Wasmtime, or wasmi.

Visit the WAHGEX playground for an example application which uses the WASM modules to execute regex on an input haystack.

This project is still a work in progress, and several features are currently missing:

WHY

Mostly for fun and for the chance to work with tools that interested me. I've been interested in WASM for a while and have a lingering interest in compilers from my time in college. I also used this project as an opportunity to experiment with programming using LLMs, though that part was a middling success.

[1] WASM engines have a different profile of optimization passes (if any), since they might assume that their input WASM module has come from another optimizing compiler like LLVM, or at least passed through an optimizer like wasm-opt. See wasmtime#4712 for some discussion about which optimization passes are present in Wasmtime and which ones are present in the expected upstream.