Constraint Handlers in JavaScript

The more you CHR, the better you are.

CHR.js is a just-in-time (JIT) compiler for Constraint Handling Rules, embedded in JavaScript. For better runtime performance it supports ahead-of-time (AOT) compilation too, either by its command line tool chrjs or babel-plugin-chr, a plugin for Babel.

Constraint Handling Rules - for short CHR - is a declarative, rule-based language extension. Originally created in the early 1990s to implement new constraint solvers in a high level programming language, it has its origins in the logic and constraint programming. Today CHR is used as a general-purpose programming language with a wide range of applications. Besides this CHR implementation in JavaScript there are CHR systems for Prolog, Java, C, Haskell and other popular programming languages.