Skip to content

add a regexp crate to the Rust distribution #42

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Apr 22, 2014
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Notes on future work (optimizations and Unicode).
  • Loading branch information
BurntSushi committed Apr 15, 2014
commit 61b023023237a9cdd72b2206a927b408998ff16a
20 changes: 20 additions & 0 deletions active/0000-regexps.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,3 +259,23 @@ can always pick one of the existing C or C++ libraries.

For now, we could mark the API as `#[unstable]` or `#[experimental]`.

# Future work

I think most of the future work for this crate is to increase the performance,
either by implementing different matching algorithms (e.g., a DFA) or by
compiling a regular expression to native Rust code.

With regard to native compilation, there are a few notes:

* If and when a DFA is implemented, care must be taken, as the size of the code
required can grow rapidly.
* Adding native compilation will very likely change the interface of the crate
in a meaningful way, particularly if we want the interface to be consistent
between natively compiled and dynamically compiled regexps. (i.e., Make
`Regexp` a trait.)

Other future work (that is probably more important) includes more Unicode
support, specifically for simple case folding. Also, words and word boundaries
should also be Unicode friendly, but I plan to have this done before I submit a
PR.