bytecodealliance / StarlingMonkey

The StarlingMonkey JS runtime
Apache License 2.0
96 stars 14 forks source link

Support Wizer-time precompiled regular expressions #168

Open guybedford opened 2 weeks ago

guybedford commented 2 weeks ago

There are a few stories here, but this one is a very simple one - inline Fastly's current code modification approach to precompiling regular expressions into something that runs at Wizer time.

That is, moving what we do in https://github.com/fastly/js-compute-runtime/blob/main/src/precompile.js into something that is in StarlingMonkey as part of its initialization.

The better Wasm emission story for regex compilation would be ideal of course, but let's track that in a separate issue.