CEL-Rust WASM-bindgen Demo

This demo uses wasm-bindgen to provide a clean JavaScript API for CEL evaluation.

Click "Evaluate" to see results...

Examples (click to try):

Basic String Operations

Expression: 'Hello ' + name + '!' Context: {"name": "World"}

Math Operations

Expression: (price * quantity) * (1 + tax) Context: {"price": 10.50, "quantity": 3, "tax": 0.08}

List Operations

Expression: scores.filter(s, s > 90).size() + ' high scores' Context: {"scores": [85, 92, 78, 96, 88]}

Conditional Logic

Expression: age >= 18 ? (age >= 65 ? 'senior' : 'adult') : 'minor' Context: {"age": 25}

Map/Object Access

Expression: user.profile.country == 'US' && user.profile.verified Context: {"user": {"profile": {"country": "US", "verified": true}}}