archseer / enigma

An Erlang VM implementation in Rust
Mozilla Public License 2.0
1.05k stars 39 forks source link

Regex #15

Open archseer opened 5 years ago

archseer commented 5 years ago

This issue concerns the re module.

We want to use the regex crate, because it's mostly PCRE compatible, but drops lookaheads and some other features to make it execute in linear time. This way we'd be able to estimate the reductions based on the pattern and binary length.

This issue first requires binaries to be implemented (refs #20).

archseer commented 5 years ago

Binaries are now stable enough for this to be worked on.

Sidenote, we want to use regex::bytes (https://docs.rs/regex/1.1.0/regex/bytes/index.html), not regex, since the bytes submodule operates on raw &[u8]/Vec bytes — Rust String/&str requires us to always hold a valid utf-8 string, which is not necessarily true in erlang-land, it's also a bit more performant.

archseer commented 5 years ago

Work has started over on https://github.com/archseer/enigma/tree/regex