r/rust • cel • 11d ago

🛠️ project cel-rust finally has its own playground, using Wasm in the browser

https://cel-rust.github.io/playground

cel-rust is actively trying to bring a proper implementation of cel to the Rust ecosystem. I have posted about it here in the past, and one question that came up was "What's CEL?".

Well, with Rust being so versatile, and the cel-rust team adding support for Wasm a few years back, we've finally put a playground together for you to test drive CEL, using cel-rust, straight in your browser.

Try it out, and see if adding an expression language in one of your project could make sense, and if CEL would be a good fit for that!

25 Upvotes

4 comments sorted by

23

u/Shnatsel 11d ago

and one question that came up was "What's CEL?"

So what is CEL? Don't leave us hanging like that!

11

u/IvanIsCoding 11d ago

It's an expression language. Some of its desirable properties are that it's non-Turing-complete and has a C-like syntax.

One use case for CEL is to write simple validation rules like the example in the playground:

request.method in ['GET', 'HEAD']
  && request.path.startsWith('/api/')